RecommendedSettingItem.qml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (c) 2022 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import QtQuick.Controls 2.3
  5. import QtQuick.Layouts 2.10
  6. import UM 1.5 as UM
  7. import Cura 1.7 as Cura
  8. Item
  9. {
  10. width: parent.width
  11. height: UM.Theme.getSize("section_header").height
  12. Layout.fillWidth: true
  13. property alias settingControl: settingContainer.children
  14. property alias settingName: settingLabel.text
  15. property int leftColumnWidth: Math.floor(width * 0.35)
  16. UM.Label
  17. {
  18. id: settingLabel
  19. width: leftColumnWidth
  20. anchors.left: parent.left
  21. anchors.verticalCenter: parent.verticalCenter
  22. // These numbers come from the IconWithText in RecommendedSettingSection
  23. anchors.leftMargin: UM.Theme.getSize("medium_button_icon").width + UM.Theme.getSize("thick_margin").width - UM.Theme.getSize("thick_lining").width
  24. }
  25. Loader
  26. {
  27. id: settingContainer
  28. height: childrenRect.height
  29. anchors.left: settingLabel.right
  30. anchors.right: parent.right
  31. anchors.verticalCenter: parent.verticalCenter
  32. }
  33. }