PackageTypeTab.qml 1013 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2021 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.15
  4. import QtQuick.Controls 2.15
  5. import UM 1.5 as UM
  6. TabButton
  7. {
  8. property string pageTitle
  9. padding: UM.Theme.getSize("narrow_margin").width
  10. horizontalPadding: UM.Theme.getSize("default_margin").width
  11. hoverEnabled: true
  12. property color inactiveBackgroundColor : hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("detail_background")
  13. property color activeBackgroundColor : UM.Theme.getColor("main_background")
  14. background: Rectangle
  15. {
  16. anchors.fill: parent
  17. color: parent.checked ? activeBackgroundColor : inactiveBackgroundColor
  18. border.color: UM.Theme.getColor("detail_background")
  19. border.width: UM.Theme.getSize("thick_lining").width
  20. }
  21. contentItem: UM.Label
  22. {
  23. text: parent.text
  24. font: UM.Theme.getFont("medium_bold")
  25. width: contentWidth
  26. anchors.centerIn: parent
  27. }
  28. }