From 9f75b870a77fface499ab4a2d8f90c8d99e9bde5 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 22 Feb 2022 16:18:01 +0100 Subject: [PATCH 1/2] Swap "+" and "-" made from Rectangle elements for icons. CURA-8688 --- resources/qml/SpinBox.qml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/resources/qml/SpinBox.qml b/resources/qml/SpinBox.qml index b93a569e99..4035515750 100644 --- a/resources/qml/SpinBox.qml +++ b/resources/qml/SpinBox.qml @@ -102,14 +102,13 @@ Item color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") } - // Minus icon - Rectangle + UM.RecolorImage { - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - width: parent.width / 4 - height: 2 + anchors.centerIn: parent + height: parent.height / 2.5 + width: height color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("Minus") } } @@ -123,22 +122,13 @@ Item color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") } - // Plus Icon - Rectangle + UM.RecolorImage { - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - width: parent.width / 3.5 - height: 2 - color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") - } - Rectangle - { - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - width: 2 - height: parent.width / 3.5 + anchors.centerIn: parent + height: parent.height / 2.5 + width: height color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("Plus") } } } From c3abfec535966921c4afd6723687040b4c1d9a2f Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 23 Feb 2022 12:00:11 +0100 Subject: [PATCH 2/2] Combobox height/width was being resized by RowLayout causing it to be squished. Assigned a implicit width/height which is used instead of height/width. CURA-8688 --- resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml | 6 ++++-- resources/themes/cura-light/theme.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml index 15540e1964..5c75993d39 100644 --- a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml @@ -91,10 +91,12 @@ UM.Dialog buttonSpacing: UM.Theme.getSize("thin_margin").width leftButtons: [ - ComboBox + Cura.ComboBox { + implicitHeight: UM.Theme.getSize("combobox_dialog").height + implicitWidth: UM.Theme.getSize("combobox_dialog").width + id: discardOrKeepProfileChangesDropDownButton - width: 300 textRole: "text" model: ListModel diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 1b23ae9307..2c23c0ed17 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -620,6 +620,7 @@ "checkbox_label_padding": [0.5, 0.5], "spinbox": [6.0, 3.0], + "combobox_dialog": [14, 2], "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0],