Merge remote-tracking branch 'origin/CURA-8688_qt6_cleanup' into CURA-8688_qt6_cleanup

This commit is contained in:
casper 2022-02-21 12:02:36 +01:00
commit 16325229af
4 changed files with 31 additions and 10 deletions

View file

@ -11,19 +11,26 @@ import ".."
Button { Button {
id: base; id: base;
background: Item { } background: Item {}
contentItem: Row contentItem: Row
{ {
spacing: UM.Theme.getSize("default_lining").width spacing: UM.Theme.getSize("default_lining").width
UM.RecolorImage Item //Wrapper to give space before icon with fixed width. This allows aligning checkbox with category icon.
{ {
anchors.verticalCenter: parent.verticalCenter height: label.height
height: (label.height / 2) | 0
width: height width: height
source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight"); anchors.verticalCenter: parent.verticalCenter
color: base.hovered ? palette.highlight : palette.buttonText
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
height: (label.height / 2) | 0
width: height
source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight");
color: base.hovered ? palette.highlight : palette.buttonText
}
} }
UM.RecolorImage UM.RecolorImage
{ {

View file

@ -10,16 +10,25 @@ import Cura 1.0 as Cura
UM.TooltipArea UM.TooltipArea
{ {
x: model.depth * UM.Theme.getSize("default_margin").width; x: model.depth * UM.Theme.getSize("default_margin").width
text: model.description; text: model.description
width: childrenRect.width; width: childrenRect.width
height: childrenRect.height; height: childrenRect.height
Item
{
id: spacer
// Align checkbox with PerObjectCategory icon
width: UM.Theme.getSize("default_margin").width
}
UM.CheckBox UM.CheckBox
{ {
id: check id: check
anchors.left: spacer.right
text: definition.label text: definition.label
checked: addedSettingsModel.getVisible(model.key) checked: addedSettingsModel.getVisible(model.key)

View file

@ -21,6 +21,8 @@ UM.Dialog
width: minimumWidth width: minimumWidth
height: minimumHeight height: minimumHeight
margin: UM.Theme.getSize("thick_margin").width
property var changesModel: Cura.UserChangesModel { id: userChangesModel } property var changesModel: Cura.UserChangesModel { id: userChangesModel }
onVisibilityChanged: onVisibilityChanged:

View file

@ -278,6 +278,7 @@ Item
width: selectors.controlWidth width: selectors.controlWidth
height: parent.height height: parent.height
anchors.verticalCenter: parent.verticalCenter
focusPolicy: Qt.ClickFocus focusPolicy: Qt.ClickFocus
@ -289,6 +290,7 @@ Item
} }
onClicked: materialsMenu.popup() onClicked: materialsMenu.popup()
} }
Item Item
{ {
width: instructionButton.width + 2 * UM.Theme.getSize("narrow_margin").width width: instructionButton.width + 2 * UM.Theme.getSize("narrow_margin").width
@ -331,6 +333,7 @@ Item
tooltip: text tooltip: text
height: parent.height height: parent.height
width: selectors.controlWidth width: selectors.controlWidth
anchors.verticalCenter: parent.verticalCenter
focusPolicy: Qt.ClickFocus focusPolicy: Qt.ClickFocus
enabled: enabledCheckbox.checked enabled: enabledCheckbox.checked