From a0f9febf628ea579866a0b3906102872617ccaf8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 12:53:46 +0100 Subject: [PATCH 1/5] Fix highlight color of quality dropdown CURA-8928 --- resources/qml/PrintSetupSelector/Custom/MenuButton.qml | 5 +---- resources/qml/ToolTip.qml | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml index 40c3d73e8b..5f5b5d2629 100644 --- a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml +++ b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml @@ -23,10 +23,7 @@ Button background: Rectangle { id: backgroundRectangle - border.width: UM.Theme.getSize("default_lining").width - border.color: button.checked ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" - color: button.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent" - radius: UM.Theme.getSize("action_button_radius").width + color: button.hovered ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1") } // Workaround to ensure that the mnemonic highlighting happens correctly diff --git a/resources/qml/ToolTip.qml b/resources/qml/ToolTip.qml index f02bf0b50f..9937c92826 100644 --- a/resources/qml/ToolTip.qml +++ b/resources/qml/ToolTip.qml @@ -29,6 +29,7 @@ ToolTip visible: opacity != 0.0 opacity: 0.0 // initially hidden + Behavior on opacity { NumberAnimation { duration: 100; } From fc577ffcbcea7a4be4493ccdbadc7db0dc4d7ad8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 13:09:09 +0100 Subject: [PATCH 2/5] Improve margins of qualities menu CURA-8928 --- resources/qml/PrintSetupSelector/Custom/MenuButton.qml | 4 ++-- .../PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml index 5f5b5d2629..cfb08b82c0 100644 --- a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml +++ b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml @@ -18,11 +18,11 @@ Button property string labelText: "" id: button hoverEnabled: true - leftPadding:UM.Theme.getSize("wide_margin").width + leftPadding: UM.Theme.getSize("default_margin").width background: Rectangle { - id: backgroundRectangle + id: backgroundRectanglewide_margin color: button.hovered ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1") } diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index d6901cfc7f..d7562ef2db 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -130,6 +130,7 @@ Popup checkable: true visible: model.available text: model.name + " - " + model.layer_height + " mm" + leftPadding: UM.Theme.getSize("wide_margin").width checked: { if (Cura.MachineManager.hasCustomQuality) @@ -195,6 +196,7 @@ Popup checkable: true visible: model.available text: model.name + leftPadding: UM.Theme.getSize("wide_margin").width checked: { var active_quality_group = Cura.MachineManager.activeQualityChangesGroup @@ -295,13 +297,12 @@ Popup id: textLabel text: manageProfilesButton.text height: contentHeight - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width } UM.Label { id: shortcutLabel text: Cura.Actions.manageProfiles.shortcut + color: UM.Theme.getColor("text_lighter") height: contentHeight anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width From cbbe961a44799c69fefea45de40fd0a2d1f37109 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 13:46:38 +0100 Subject: [PATCH 3/5] Let quality intents menu use checkmark to indicate active profile CURA-8928 --- resources/qml/Actions.qml | 2 +- .../PrintSetupSelector/Custom/MenuButton.qml | 32 ++++++++++++++++--- .../Custom/QualitiesWithIntentMenu.qml | 4 +-- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 4e2a05a6aa..ec25eb8abb 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -222,7 +222,7 @@ Item id: updateProfileAction enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings && Cura.MachineManager.activeQualityChangesGroup != null text: catalog.i18nc("@action:inmenu menubar:profile", "&Update profile with current settings/overrides"); - onTriggered: Cura.ContainerManager.updateQualityChanges(); + onTriggered: Cura.ContainerManager.updateQualityChanges() } Action diff --git a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml index cfb08b82c0..b7b9b14d5d 100644 --- a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml +++ b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml @@ -19,10 +19,14 @@ Button id: button hoverEnabled: true leftPadding: UM.Theme.getSize("default_margin").width + implicitWidth: UM.Theme.getSize("menu").width + implicitHeight: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height background: Rectangle { id: backgroundRectanglewide_margin + height: button.height + width: button.width color: button.hovered ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1") } @@ -37,11 +41,29 @@ Button return txt } - contentItem: UM.Label + contentItem: Item { - id: textLabel - text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText) - height: contentHeight - color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive") + height: button.height + width: button.width + UM.RecolorImage + { + id: check + height: UM.Theme.getSize("default_arrow").height + width: height + source: UM.Theme.getIcon("Check", "low") + color: UM.Theme.getColor("setting_control_text") + anchors.verticalCenter: parent.verticalCenter + visible: button.checked + } + UM.Label + { + id: textLabel + text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText) + height: contentHeight + color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive") + anchors.left: check.right + anchors.leftMargin: UM.Theme.getSize("narrow_margin").width + anchors.verticalCenter: parent.verticalCenter + } } } \ No newline at end of file diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index d7562ef2db..a2624dbf14 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -130,7 +130,7 @@ Popup checkable: true visible: model.available text: model.name + " - " + model.layer_height + " mm" - leftPadding: UM.Theme.getSize("wide_margin").width + leftPadding: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width checked: { if (Cura.MachineManager.hasCustomQuality) @@ -196,7 +196,7 @@ Popup checkable: true visible: model.available text: model.name - leftPadding: UM.Theme.getSize("wide_margin").width + leftPadding: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width checked: { var active_quality_group = Cura.MachineManager.activeQualityChangesGroup From 58ca09e1c6ec44d3a7ce84f6e296a019ebb536b2 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Mon, 7 Mar 2022 10:43:46 +0100 Subject: [PATCH 4/5] Remove unused id --- resources/qml/PrintSetupSelector/Custom/MenuButton.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml index b7b9b14d5d..262bc1c512 100644 --- a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml +++ b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml @@ -24,7 +24,6 @@ Button background: Rectangle { - id: backgroundRectanglewide_margin height: button.height width: button.width color: button.hovered ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1") From 11d7afe5052c48a3ceaa004e59f91f33acdc9f33 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Mon, 7 Mar 2022 10:44:24 +0100 Subject: [PATCH 5/5] Formatting of inline if statement --- resources/qml/PrintSetupSelector/Custom/MenuButton.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml index 262bc1c512..112edbbf77 100644 --- a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml +++ b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml @@ -26,7 +26,7 @@ Button { height: button.height width: button.width - color: button.hovered ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1") + color: button.hovered ? UM.Theme.getColor("background_2") : UM.Theme.getColor("background_1") } // Workaround to ensure that the mnemonic highlighting happens correctly