From a0f9febf628ea579866a0b3906102872617ccaf8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 12:53:46 +0100 Subject: [PATCH 01/24] 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 02/24] 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 03/24] 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 6b9e66cfb77788915c8589d1bc44eebf56bafdcc Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 14:06:27 +0100 Subject: [PATCH 04/24] Add title to profiles page CURA-8982 --- resources/qml/Preferences/ProfilesPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index dcf02bc738..ec886fbcf9 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -13,7 +13,7 @@ import Cura 1.6 as Cura UM.ManagementPage { id: base - + title: catalog.i18nc("@title:tab", "Profiles") property var extrudersModel: CuraApplication.getExtrudersModel() property var qualityManagementModel: CuraApplication.getQualityManagementModel() From 165172f919677bd3f2502a6d7b516b764e03b480 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 14:08:47 +0100 Subject: [PATCH 05/24] Re-add Duplicate button in profiles page CURA-8982 --- resources/qml/Preferences/ProfilesPage.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index ec886fbcf9..39885dbfd5 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -179,6 +179,16 @@ UM.ManagementPage } } Cura.MenuItem + { + text: catalog.i18nc("@action:button", "Duplicate") + enabled: base.hasCurrentItem + onTriggered: + { + forceActiveFocus() + duplicateQualityDialog.open() + } + } + Cura.MenuItem { text: catalog.i18nc("@action:button", "Remove") enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated From 802a80b70239d4181bd2fe20337b31e1c2982b13 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 14:12:55 +0100 Subject: [PATCH 06/24] Fix visibility of create new button in profiles page CURA-8982 --- resources/qml/Preferences/ProfilesPage.qml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 39885dbfd5..8ca545c633 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -50,10 +50,7 @@ UM.ManagementPage } } - property var canCreateProfile: - { - return isCurrentItemActivated && Cura.MachineManager.hasUserSettings; - } + property var canCreateProfile: Cura.MachineManager.hasUserSettings model: qualityManagementModel buttons: [ From 950fc6f3da41a7a6aee5876df8f5afbed20ec994 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 14:18:58 +0100 Subject: [PATCH 07/24] Hide hamburger menu if no item is selected CURA-8982 --- resources/qml/Preferences/ProfilesPage.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 8ca545c633..d0578a5872 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -21,8 +21,9 @@ UM.ManagementPage onHamburgeButtonClicked: menu.popup(content_item, content_item.width - menu.width, hamburger_button.height) + property bool hasCurrentItem: base.currentItem != null + hamburgerButtonVisible: hasCurrentItem - property var hasCurrentItem: base.currentItem != null sectionRole: "section_name" property var currentItem: From e569346750b5cf409501065186dc42f8393761e7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 14:19:21 +0100 Subject: [PATCH 08/24] Move scrollview caption over two lines CURA-8982 --- resources/qml/Preferences/ProfilesPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index d0578a5872..f8c0b75851 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -17,7 +17,7 @@ UM.ManagementPage property var extrudersModel: CuraApplication.getExtrudersModel() property var qualityManagementModel: CuraApplication.getQualityManagementModel() - scrollviewCaption: catalog.i18nc("@label", "Profiles compatible with active printer:") + "" + Cura.MachineManager.activeMachine.name + "" + scrollviewCaption: catalog.i18nc("@label", "Profiles compatible with active printer:") + "
" + Cura.MachineManager.activeMachine.name + "" onHamburgeButtonClicked: menu.popup(content_item, content_item.width - menu.width, hamburger_button.height) From efea7c9bedc02e17003cc3c07202ae501c4e5f5e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 3 Mar 2022 14:23:05 +0100 Subject: [PATCH 09/24] Clean up ordering of properties in profiles page Boyscouting; It was a bit of a mess CURA-8982 --- resources/qml/Preferences/ProfilesPage.qml | 68 ++++++++++------------ 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index f8c0b75851..e5848a86c7 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -13,29 +13,17 @@ import Cura 1.6 as Cura UM.ManagementPage { id: base - title: catalog.i18nc("@title:tab", "Profiles") + property var extrudersModel: CuraApplication.getExtrudersModel() property var qualityManagementModel: CuraApplication.getQualityManagementModel() - - scrollviewCaption: catalog.i18nc("@label", "Profiles compatible with active printer:") + "
" + Cura.MachineManager.activeMachine.name + "" - - onHamburgeButtonClicked: menu.popup(content_item, content_item.width - menu.width, hamburger_button.height) - property bool hasCurrentItem: base.currentItem != null - hamburgerButtonVisible: hasCurrentItem - sectionRole: "section_name" + property var currentItem: objectList.currentIndex == -1 ? null : base.qualityManagementModel.getItem(objectList.currentIndex) - property var currentItem: - { - var current_index = objectList.currentIndex; - return (current_index == -1) ? null : base.qualityManagementModel.getItem(current_index); - } + property string currentItemName: hasCurrentItem ? base.currentItem.name : "" + property string currentItemDisplayName: hasCurrentItem ? base.qualityManagementModel.getQualityItemDisplayName(base.currentItem) : "" - property var currentItemName: hasCurrentItem ? base.currentItem.name : "" - property var currentItemDisplayName: hasCurrentItem ? base.qualityManagementModel.getQualityItemDisplayName(base.currentItem) : "" - - property var isCurrentItemActivated: + property bool isCurrentItemActivated: { if (!base.currentItem) { @@ -51,7 +39,28 @@ UM.ManagementPage } } - property var canCreateProfile: Cura.MachineManager.hasUserSettings + property bool canCreateProfile: Cura.MachineManager.hasUserSettings + + signal createProfile() // Click create profile from ... in Profile context menu + + property string newQualityNameToSelect: "" + property bool toActivateNewQuality: false + + onHamburgeButtonClicked: menu.popup(content_item, content_item.width - menu.width, hamburger_button.height) + + onCreateProfile: + { + createQualityDialog.object = Cura.ContainerManager.makeUniqueName(Cura.MachineManager.activeQualityOrQualityChangesName); + createQualityDialog.open(); + createQualityDialog.selectText(); + } + + title: catalog.i18nc("@title:tab", "Profiles") + scrollviewCaption: catalog.i18nc("@label", "Profiles compatible with active printer:") + "
" + Cura.MachineManager.activeMachine.name + "" + + hamburgerButtonVisible: hasCurrentItem + + sectionRole: "section_name" model: qualityManagementModel buttons: [ @@ -77,18 +86,6 @@ UM.ManagementPage } ] - // Click create profile from ... in Profile context menu - signal createProfile() - onCreateProfile: - { - createQualityDialog.object = Cura.ContainerManager.makeUniqueName(Cura.MachineManager.activeQualityOrQualityChangesName); - createQualityDialog.open(); - createQualityDialog.selectText(); - } - - property string newQualityNameToSelect: "" - property bool toActivateNewQuality: false - Item { id: content_item @@ -246,10 +243,7 @@ UM.ManagementPage id: duplicateQualityDialog title: catalog.i18nc("@title:window", "Duplicate Profile") object: "" - onAccepted: - { - base.qualityManagementModel.duplicateQualityChanges(newName, base.currentItem); - } + onAccepted: base.qualityManagementModel.duplicateQualityChanges(newName, base.currentItem) } // Confirmation dialog for removing a profile @@ -338,9 +332,9 @@ UM.ManagementPage Cura.SecondaryButton { - text: catalog.i18nc("@action:button", "Discard current changes"); + text: catalog.i18nc("@action:button", "Discard current changes") enabled: Cura.MachineManager.hasUserSettings - onClicked: Cura.ContainerManager.clearUserContainers(); + onClicked: Cura.ContainerManager.clearUserContainers() } } @@ -362,7 +356,7 @@ UM.ManagementPage UM.TabRow { id: profileExtruderTabs - UM.TabRowButton //One extra tab for the global settings. + UM.TabRowButton // One extra tab for the global settings. { text: catalog.i18nc("@title:tab", "Global Settings") } From 3c7498feed99d85eb11e4dd859753e3c97a74f28 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Thu, 3 Mar 2022 15:53:30 +0100 Subject: [PATCH 10/24] Move ToolbarButton and ToolTip from Cura into Uranium. This makes it possible to use new styled ToolbarButton in plugins/Tools for the rotate tool. Removed the ContentAlignment enum in ToolTip in favour of using the Text.ContentAlignment enum. For some reason references to this enum fail everywhere when ToolTip is moved into Uranium. There is some evil time-wasting magic cast on this component! CURA-8943 --- plugins/ImageReader/ConfigUI.qml | 16 +-- .../resources/qml/ManagePackagesButton.qml | 4 +- .../resources/qml/PackageDetails.qml | 4 +- .../resources/qml/VerifiedIcon.qml | 2 +- .../PerObjectSettingsPanel.qml | 8 +- .../PostProcessingPlugin.qml | 2 +- resources/qml/ActionButton.qml | 2 +- .../qml/ActionPanel/OutputProcessWidget.qml | 4 +- .../ApplicationSwitcher/ApplicationButton.qml | 2 +- resources/qml/ExtruderButton.qml | 4 +- .../ConfigurationMenu/ConfigurationMenu.qml | 2 +- resources/qml/ObjectItemButton.qml | 2 +- resources/qml/PrintSetupHeaderButton.qml | 2 +- .../qml/PrinterSelector/MachineSelector.qml | 2 +- resources/qml/ToolTip.qml | 82 ------------- resources/qml/Toolbar.qml | 4 +- resources/qml/ToolbarButton.qml | 110 ------------------ resources/qml/qmldir | 2 - 18 files changed, 30 insertions(+), 224 deletions(-) delete mode 100644 resources/qml/ToolTip.qml delete mode 100644 resources/qml/ToolbarButton.qml diff --git a/plugins/ImageReader/ConfigUI.qml b/plugins/ImageReader/ConfigUI.qml index ff79e4e31d..28fd1f9106 100644 --- a/plugins/ImageReader/ConfigUI.qml +++ b/plugins/ImageReader/ConfigUI.qml @@ -51,7 +51,7 @@ UM.Dialog onTextChanged: manager.onPeakHeightChanged(text) } - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "The maximum distance of each pixel from \"Base.\"") visible: peak_height.hovered || peak_height_label.containsMouse @@ -85,7 +85,7 @@ UM.Dialog onTextChanged: manager.onBaseHeightChanged(text) } - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "The base height from the build plate in millimeters.") visible: base_height.hovered || base_height_label.containsMouse @@ -119,7 +119,7 @@ UM.Dialog onTextChanged: manager.onWidthChanged(text) } - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "The width in millimeters on the build plate") visible: width.hovered || width_label.containsMouse @@ -153,7 +153,7 @@ UM.Dialog onTextChanged: manager.onDepthChanged(text) } - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "The depth in millimeters on the build plate") visible: depth.hovered || depth_label.containsMouse @@ -190,7 +190,7 @@ UM.Dialog onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) } } - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.") visible: lighter_is_higher.hovered || lighter_is_higher_label.containsMouse @@ -227,7 +227,7 @@ UM.Dialog onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) } } - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "For lithophanes a simple logarithmic model for translucency is available. For height maps the pixel values correspond to heights linearly.") visible: color_model.hovered || color_model_label.containsMouse @@ -258,7 +258,7 @@ UM.Dialog validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ } onTextChanged: manager.onTransmittanceChanged(text) - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.") visible: parent.hovered || transmittance_label.containsMouse @@ -293,7 +293,7 @@ UM.Dialog onValueChanged: manager.onSmoothingChanged(value) } - Cura.ToolTip + UM.ToolTip { text: catalog.i18nc("@info:tooltip", "The amount of smoothing to apply to the image.") visible: smoothing.hovered || smoothing_label.containsMouse diff --git a/plugins/Marketplace/resources/qml/ManagePackagesButton.qml b/plugins/Marketplace/resources/qml/ManagePackagesButton.qml index 92e2196beb..fc9e7d757f 100644 --- a/plugins/Marketplace/resources/qml/ManagePackagesButton.qml +++ b/plugins/Marketplace/resources/qml/ManagePackagesButton.qml @@ -1,7 +1,7 @@ // Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.6 as Cura import QtQuick 2.15 @@ -25,7 +25,7 @@ TabButton radius: Math.round(width * 0.5) } - Cura.ToolTip + UM.ToolTip { id: tooltip diff --git a/plugins/Marketplace/resources/qml/PackageDetails.qml b/plugins/Marketplace/resources/qml/PackageDetails.qml index 2599c7f28c..4bf32c53d7 100644 --- a/plugins/Marketplace/resources/qml/PackageDetails.qml +++ b/plugins/Marketplace/resources/qml/PackageDetails.qml @@ -6,7 +6,7 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.3 import Cura 1.0 as Cura -import UM 1.0 as UM +import UM 1.5 as UM Item { @@ -38,7 +38,7 @@ Item onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it. tooltip: catalog.i18nc("@button:tooltip", "Back") - toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignRight + toolTipContentAlignment: Text.AlignRight leftPadding: UM.Theme.getSize("narrow_margin").width rightPadding: leftPadding iconSource: UM.Theme.getIcon("ArrowLeft") diff --git a/plugins/Marketplace/resources/qml/VerifiedIcon.qml b/plugins/Marketplace/resources/qml/VerifiedIcon.qml index 30ef3080a0..6b9d7b6017 100644 --- a/plugins/Marketplace/resources/qml/VerifiedIcon.qml +++ b/plugins/Marketplace/resources/qml/VerifiedIcon.qml @@ -12,7 +12,7 @@ Control implicitWidth: UM.Theme.getSize("card_tiny_icon").width implicitHeight: UM.Theme.getSize("card_tiny_icon").height - Cura.ToolTip + UM.ToolTip { tooltipText: { diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 03e1da7d35..17bdee2618 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -75,7 +75,7 @@ Item id: meshTypeButtons spacing: UM.Theme.getSize("default_margin").width - Cura.ToolbarButton + UM.ToolbarButton { id: normalButton text: catalog.i18nc("@label", "Normal model") @@ -90,7 +90,7 @@ Item z: 4 } - Cura.ToolbarButton + UM.ToolbarButton { id: supportMeshButton text: catalog.i18nc("@label", "Print as support") @@ -105,7 +105,7 @@ Item z: 3 } - Cura.ToolbarButton + UM.ToolbarButton { id: overlapMeshButton text: catalog.i18nc("@label", "Modify settings for overlaps") @@ -120,7 +120,7 @@ Item z: 2 } - Cura.ToolbarButton + UM.ToolbarButton { id: antiOverhangMeshButton text: catalog.i18nc("@label", "Don't support overlaps") diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index 9c59f9e879..7bb179e8ed 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -479,7 +479,7 @@ UM.Dialog } return tipText } - toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft + toolTipContentAlignment: Text.AlignLeft onClicked: dialog.show() iconSource: "Script.svg" fixedWidthMode: false diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index e866260158..5cec567ae4 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -179,7 +179,7 @@ Button cornerSide: Cura.RoundedRectangle.Direction.None } - Cura.ToolTip + UM.ToolTip { id: tooltip visible: diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml index 6e412c9a04..13c910d9cc 100644 --- a/resources/qml/ActionPanel/OutputProcessWidget.qml +++ b/resources/qml/ActionPanel/OutputProcessWidget.qml @@ -5,7 +5,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -128,7 +128,7 @@ Column tooltip: text fixedWidthMode: true - toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft + toolTipContentAlignment: Text.AlignLeft onClicked: UM.Controller.setActiveStage("PreviewStage") } diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index 0384ca2ed5..182b80811b 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -31,7 +31,7 @@ Button border.width: UM.Theme.getSize("default_lining").width } - Cura.ToolTip + UM.ToolTip { id: tooltip tooltipText: base.text diff --git a/resources/qml/ExtruderButton.qml b/resources/qml/ExtruderButton.qml index b87855e25e..204e9a5469 100644 --- a/resources/qml/ExtruderButton.qml +++ b/resources/qml/ExtruderButton.qml @@ -4,10 +4,10 @@ import QtQuick 2.2 import QtQuick.Controls 2.0 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Cura.ToolbarButton +UM.ToolbarButton { id: base diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index 6f7ee90733..f0b6e14683 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -83,7 +83,7 @@ Cura.ExpandablePopup onExited: { tooltip.hide() } } - Cura.ToolTip + UM.ToolTip { id: tooltip x: 0 diff --git a/resources/qml/ObjectItemButton.qml b/resources/qml/ObjectItemButton.qml index 73295b2e69..c3066b800d 100644 --- a/resources/qml/ObjectItemButton.qml +++ b/resources/qml/ObjectItemButton.qml @@ -188,7 +188,7 @@ Button elideWidth: buttonText.width } - Cura.ToolTip + UM.ToolTip { id: tooltip tooltipText: objectItemButton.text + perObjectSettingsInfo.tooltipText diff --git a/resources/qml/PrintSetupHeaderButton.qml b/resources/qml/PrintSetupHeaderButton.qml index e41f95f778..e9b76a763f 100644 --- a/resources/qml/PrintSetupHeaderButton.qml +++ b/resources/qml/PrintSetupHeaderButton.qml @@ -19,7 +19,7 @@ ToolButton property bool valueError: false; property bool valueWarning: false; - Cura.ToolTip + UM.ToolTip { id: tooltip visible: base.hovered diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 8bea52fab6..12f495f7a8 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -172,7 +172,7 @@ Cura.ExpandablePopup onExited: { tooltip.hide() } } - Cura.ToolTip + UM.ToolTip { id: tooltip diff --git a/resources/qml/ToolTip.qml b/resources/qml/ToolTip.qml deleted file mode 100644 index f02bf0b50f..0000000000 --- a/resources/qml/ToolTip.qml +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 2.3 - -import UM 1.5 as UM -import Cura 1.0 as Cura - -ToolTip -{ - enum ContentAlignment - { - AlignLeft, - AlignRight - } - - // Defines the alignment of the content, by default to the left - property int contentAlignment: Cura.ToolTip.ContentAlignment.AlignRight - - property alias tooltipText: tooltip.text - property alias arrowSize: backgroundRect.arrowSize - property var targetPoint: Qt.point(parent.x, y + Math.round(height/2)) - - id: tooltip - text: "" - delay: 500 - font: UM.Theme.getFont("default") - visible: opacity != 0.0 - opacity: 0.0 // initially hidden - - Behavior on opacity - { - NumberAnimation { duration: 100; } - } - - onAboutToShow: show() - onAboutToHide: hide() - - // If the text is not set, just set the height to 0 to prevent it from showing - height: label.contentHeight + 2 * UM.Theme.getSize("thin_margin").width - - x: - { - if (contentAlignment == Cura.ToolTip.ContentAlignment.AlignLeft) - { - return (label.width + Math.round(UM.Theme.getSize("default_arrow").width * 1.2) + padding * 2) * -1 - } - return parent.width + Math.round(UM.Theme.getSize("default_arrow").width * 1.2 + padding) - } - - y: Math.round(parent.height / 2 - label.height / 2 ) - padding - - padding: UM.Theme.getSize("thin_margin").width - - background: UM.PointingRectangle - { - id: backgroundRect - color: UM.Theme.getColor("tooltip") - target: Qt.point(targetPoint.x - tooltip.x, targetPoint.y - tooltip.y) - arrowSize: UM.Theme.getSize("default_arrow").width - visible: tooltip.height != 0 - } - - contentItem: UM.Label - { - id: label - text: tooltip.text - font: tooltip.font - wrapMode: Text.Wrap - textFormat: Text.RichText - color: UM.Theme.getColor("tooltip_text") - } - - function show() { - opacity = text != "" ? 1 : 0 - } - - function hide() { - opacity = 0 - } -} \ No newline at end of file diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 66163fed37..2b79f22957 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -4,7 +4,7 @@ import QtQuick 2.2 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -53,7 +53,7 @@ Item width: childrenRect.width height: childrenRect.height - delegate: ToolbarButton + delegate: UM.ToolbarButton { text: model.name + (model.shortcut ? (" (" + model.shortcut + ")") : "") checkable: true diff --git a/resources/qml/ToolbarButton.qml b/resources/qml/ToolbarButton.qml deleted file mode 100644 index 206ab23dc4..0000000000 --- a/resources/qml/ToolbarButton.qml +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 2.3 - -import UM 1.2 as UM -import Cura 1.0 as Cura - -Button -{ - id: base - - property alias toolItem: contentItemLoader.sourceComponent - - // These two properties indicate whether the toolbar button is at the top of the toolbar column or at the bottom. - // If it is somewhere in the middle, then both has to be false. If there is only one element in the column, then - // both properties have to be set to true. This is used to create a rounded corner. - property bool isTopElement: false - property bool isBottomElement: false - - hoverEnabled: true - - background: Rectangle - { - implicitWidth: UM.Theme.getSize("button").width - implicitHeight: UM.Theme.getSize("button").height - color: UM.Theme.getColor("toolbar_background") - radius: UM.Theme.getSize("default_radius").width - - Rectangle - { - id: topSquare - anchors - { - left: parent.left - right: parent.right - top: parent.top - } - height: parent.radius - color: parent.color - visible: !base.isTopElement - } - - Rectangle - { - id: bottomSquare - anchors - { - left: parent.left - right: parent.right - bottom: parent.bottom - } - height: parent.radius - color: parent.color - visible: !base.isBottomElement - } - - Rectangle - { - id: leftSquare - anchors - { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: parent.radius - color: parent.color - } - } - contentItem: Rectangle - { - opacity: parent.enabled ? 1.0 : 0.2 - implicitWidth: Math.round(UM.Theme.getSize("button").width * 0.75) - implicitHeight: Math.round(UM.Theme.getSize("button").height * 0.75) - radius: Math.round(width * 0.5) - - color: - { - if (base.checked && base.hovered) - { - return UM.Theme.getColor("toolbar_button_active_hover") - } - else if (base.checked) - { - return UM.Theme.getColor("toolbar_button_active") - } - else if(base.hovered) - { - return UM.Theme.getColor("toolbar_button_hover") - } - return UM.Theme.getColor("toolbar_background") - } - Loader - { - id: contentItemLoader - anchors.centerIn: parent - width: Math.round(UM.Theme.getSize("button").width / 2) - height: Math.round(UM.Theme.getSize("button").height / 2) - } - } - - Cura.ToolTip - { - id: tooltip - tooltipText: base.text - visible: base.hovered - } -} diff --git a/resources/qml/qmldir b/resources/qml/qmldir index 8ddacc56e4..a47d85545b 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -14,10 +14,8 @@ OutputDevicesActionButton 1.0 OutputDevicesActionButton.qml ExpandableComponent 1.0 ExpandableComponent.qml PrinterTypeLabel 1.0 PrinterTypeLabel.qml ViewsSelector 1.0 ViewsSelector.qml -ToolbarButton 1.0 ToolbarButton.qml SettingView 1.0 SettingView.qml ProfileMenu 1.0 ProfileMenu.qml -ToolTip 1.0 ToolTip.qml # Cura/WelcomePages From 066a4936e348b31c23dcfcc64cfe274982205f24 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 4 Mar 2022 07:38:27 +0100 Subject: [PATCH 11/24] Manually revert fuzzy skin disable. Re-implementing this feature for Arachne, so it should be (possible to) enable(d) again. part of CURA-7887 --- resources/definitions/fdmprinter.def.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 7bb24d7445..b1cbb07904 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -6963,7 +6963,6 @@ "type": "bool", "default_value": false, "limit_to_extruder": "wall_0_extruder_nr", - "enabled": false, "settable_per_mesh": true }, "magic_fuzzy_skin_outside_only": @@ -6972,7 +6971,7 @@ "description": "Jitter only the parts' outlines and not the parts' holes.", "type": "bool", "default_value": false, - "enabled": "magic_fuzzy_skin_enabled and False" , + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true }, @@ -6985,7 +6984,7 @@ "default_value": 0.3, "minimum_value": "0.001", "maximum_value_warning": "wall_line_width_0", - "enabled": "magic_fuzzy_skin_enabled and False", + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true }, @@ -7000,7 +6999,7 @@ "minimum_value_warning": "0.1", "maximum_value_warning": "10", "maximum_value": "2 / magic_fuzzy_skin_thickness", - "enabled": "magic_fuzzy_skin_enabled and False", + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true, "children": @@ -7016,7 +7015,7 @@ "minimum_value_warning": "0.1", "maximum_value_warning": "10", "value": "10000 if magic_fuzzy_skin_point_density == 0 else 1 / magic_fuzzy_skin_point_density", - "enabled": "magic_fuzzy_skin_enabled and False", + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true } From a26b54f6e2b24e643175f709c8ffd2e641d27f45 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 11:28:11 +0100 Subject: [PATCH 12/24] Fix checkboxes not showing check marks when disabled. Update checkboxes to align with new designs. Update SettingCheckBox to match checkbox styling. Remove duplicated styling inside cura-dark/theme.json CURA-8991 --- resources/qml/Settings/SettingCheckBox.qml | 10 +++++----- resources/themes/cura-dark/theme.json | 9 --------- resources/themes/cura-light/theme.json | 15 +++++++++------ 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 1b4e4ac143..3f8f1de89d 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -11,7 +11,7 @@ SettingItem { id: base property var focusItem: control - + enabled: false contents: MouseArea { id: control @@ -98,7 +98,7 @@ SettingItem { if(!enabled) { - return UM.Theme.getColor("checkbox_border") + return UM.Theme.getColor("checkbox_border_disabled") } switch (propertyProvider.properties.validationState) { @@ -116,7 +116,7 @@ SettingItem { return UM.Theme.getColor("checkbox_border_hover") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("checkbox_border") } color: { @@ -138,7 +138,7 @@ SettingItem // Validation is OK. if (control.containsMouse || control.activeFocus) { - return UM.Theme.getColor("setting_control_highlight") + return UM.Theme.getColor("checkbox_hover") } return UM.Theme.getColor("checkbox") } @@ -150,7 +150,7 @@ SettingItem height: UM.Theme.getSize("checkbox_mark").height width: UM.Theme.getSize("checkbox_mark").width sourceSize.height: width - color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text"); + color: !enabled ? UM.Theme.getColor("checkbox_mark_disabled") : UM.Theme.getColor("checkbox_mark"); source: UM.Theme.getIcon("Check", "low") opacity: control.checked ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100; } } diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 7b2c19ff01..bc1f6e3b9f 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -155,15 +155,6 @@ "slider_handle": [255, 255, 255, 255], "slider_handle_active": [68, 192, 255, 255], - "checkbox": "background_1", - "checkbox_hover": [43, 48, 52, 255], - "checkbox_border": "text_disabled", - "checkbox_border_hover": "border_main", - "checkbox_mark": "text_default", - "checkbox_square": "text_disabled", - "checkbox_text": "text_default", - "checkbox_disabled": "background_2", - "category_background": "background_3", "tooltip": "background_2", diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index ba18e5d0d2..b71d6c0167 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -324,13 +324,16 @@ "quality_slider_unavailable": [179, 179, 179, 255], "quality_slider_available": [0, 0, 0, 255], - "checkbox": [255, 255, 255, 255], - "checkbox_hover": "border_main", - "checkbox_border": [180, 180, 180, 255], - "checkbox_border_hover": [25, 110, 240, 255], - "checkbox_mark": [35, 35, 35, 255], + "checkbox": "background_1", + "checkbox_hover": "background_1", "checkbox_disabled": "background_2", - "checkbox_text": [0, 12, 26, 255], + "checkbox_border": [180, 180, 180, 255], + "checkbox_border_hover": "border_main", + "checkbox_border_disabled": "text_disabled", + "checkbox_mark": "text_default", + "checkbox_mark_disabled": "text_disabled", + "checkbox_text": "text_default", + "checkbox_text_disabled": "text_disabled", "category_background": "background_2", From b86b1133df928c0d65da888001b8965106268c66 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 13:02:21 +0100 Subject: [PATCH 13/24] Remove enable:false assignment that was used for testing CURA-8991 --- resources/qml/Settings/SettingCheckBox.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 3f8f1de89d..4987eedb83 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -11,7 +11,7 @@ SettingItem { id: base property var focusItem: control - enabled: false + contents: MouseArea { id: control From b3e8c7190e04d028c9828e2e43bce90af2c829dd Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 13:18:00 +0100 Subject: [PATCH 14/24] Align radio buttons with new designs. Fix radiobutton looking the same checked and unchecked when disabled CURA-8991 --- resources/qml/Widgets/RadioButton.qml | 79 ++++++++++++++++++-------- resources/themes/cura-light/theme.json | 13 +++++ 2 files changed, 68 insertions(+), 24 deletions(-) diff --git a/resources/qml/Widgets/RadioButton.qml b/resources/qml/Widgets/RadioButton.qml index 428eb8a4e5..add708507c 100644 --- a/resources/qml/Widgets/RadioButton.qml +++ b/resources/qml/Widgets/RadioButton.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -13,32 +13,58 @@ import Cura 1.0 as Cura // RadioButton { - id: radioButton + id: control font: UM.Theme.getFont("default") states: [ State { - name: "checked" - when: radioButton.checked + name: "selected-hover" + when: control.enabled && control.checked && control.hovered PropertyChanges { - target: indicator - color: UM.Theme.getColor("accent_1") - border.width: 0 + target: indicator_background + color: UM.Theme.getColor("radio_selected") + border.color: UM.Theme.getColor("radio_border_hover") } }, - State - { - name: "disabled" - when: !radioButton.enabled - PropertyChanges { target: indicator; color: UM.Theme.getColor("background_1")} + State { + name: "selected" + when: control.enabled && control.checked + PropertyChanges + { + target: indicator_background + color: UM.Theme.getColor("radio_selected") + } }, - State - { - name: "highlighted" - when: radioButton.hovered || radioButton.activeFocus - PropertyChanges { target: indicator; border.color: UM.Theme.getColor("border_main_light")} + State { + name: "hovered" + when: control.enabled && control.hovered + PropertyChanges + { + target: indicator_background + border.color: UM.Theme.getColor("radio_border_hover") + } + }, + State { + name: "selected_disabled" + when: !control.enabled && control.checked + PropertyChanges + { + target: indicator_background + color: UM.Theme.getColor("radio_selected_disabled") + border.color: UM.Theme.getColor("radio_border_disabled") + } + }, + State { + name: "disabled" + when: !control.enabled + PropertyChanges + { + target: indicator_background + color: UM.Theme.getColor("radio_disabled") + border.color: UM.Theme.getColor("radio_border_disabled") + } } ] @@ -49,30 +75,35 @@ RadioButton indicator: Rectangle { + id: indicator_background implicitWidth: UM.Theme.getSize("radio_button").width implicitHeight: UM.Theme.getSize("radio_button").height anchors.verticalCenter: parent.verticalCenter anchors.alignWhenCentered: false radius: width / 2 - color: UM.Theme.getColor("background_2") + color: UM.Theme.getColor("radio") border.width: UM.Theme.getSize("default_lining").width - border.color: UM.Theme.getColor("text_disabled") + border.color: UM.Theme.getColor("radio_border") Rectangle { + id: indicator_dot width: (parent.width / 2) | 0 height: width anchors.centerIn: parent radius: width / 2 - color: radioButton.enabled ? UM.Theme.getColor("background_2") : UM.Theme.getColor("background_1") - visible: radioButton.checked + color: control.enabled ? UM.Theme.getColor("radio_dot") : UM.Theme.getColor("radio_dot_disabled") + visible: control.checked + + } } contentItem: UM.Label { - leftPadding: radioButton.indicator.width + radioButton.spacing - text: radioButton.text - font: radioButton.font + leftPadding: control.indicator.width + control.spacing + text: control.text + font: control.font + color: control.enabled ? UM.Theme.getColor("radio_text"): UM.Theme.getColor("radio_text_disabled") } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index b71d6c0167..f96a45e32f 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -335,6 +335,19 @@ "checkbox_text": "text_default", "checkbox_text_disabled": "text_disabled", + "radio": "background_1", + "radio_disabled": "background_2", + "radio_selected": "accent_1", + "radio_selected_disabled": "text_disabled", + "radio_border": [180, 180, 180, 255], + "radio_border_hover": "border_main", + "radio_border_disabled": "text_disabled", + "radio_dot": "background_1", + "radio_dot_disabled": "background_2", + "radio_text": "text_default", + "radio_text_disabled": "text_disabled", + + "category_background": "background_2", "tooltip": [25, 25, 25, 255], From 1fc6b8ced62cdc41bbec5b0ecfc1c46eb2a04b46 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 13:22:55 +0100 Subject: [PATCH 15/24] New designs use dark mode border_main for dark theme. Remove uses of border_main_light. The only puprose of this color was to give dark mode access to the border_main of the light theme. CURA-8991 --- resources/qml/MachineSettings/GcodeTextArea.qml | 2 +- resources/qml/MachineSettings/NumericTextFieldWithUnit.qml | 2 +- resources/qml/PrintSetupHeaderButton.qml | 2 +- resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml | 2 +- resources/qml/Settings/SettingExtruder.qml | 2 +- resources/qml/Settings/SettingOptionalExtruder.qml | 2 +- resources/qml/Settings/SettingTextField.qml | 2 +- resources/qml/Widgets/ComboBox.qml | 2 +- resources/qml/Widgets/TextField.qml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/qml/MachineSettings/GcodeTextArea.qml b/resources/qml/MachineSettings/GcodeTextArea.qml index bb14dafcc6..7791e169c2 100644 --- a/resources/qml/MachineSettings/GcodeTextArea.qml +++ b/resources/qml/MachineSettings/GcodeTextArea.qml @@ -91,7 +91,7 @@ UM.TooltipArea } if (gcodeTextArea.hovered || gcodeTextArea.activeFocus) { - return UM.Theme.getColor("border_main_light") + return UM.Theme.getColor("border_main") } return UM.Theme.getColor("border_field_light") } diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml index 0e1f296cfa..18c3f8bbe5 100644 --- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml +++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml @@ -107,7 +107,7 @@ UM.TooltipArea // Validation is OK. if (textFieldWithUnit.hovered || textFieldWithUnit.activeFocus) { - return UM.Theme.getColor("border_main_light") + return UM.Theme.getColor("border_main") } return UM.Theme.getColor("border_field_light") } diff --git a/resources/qml/PrintSetupHeaderButton.qml b/resources/qml/PrintSetupHeaderButton.qml index e41f95f778..f552b9fc37 100644 --- a/resources/qml/PrintSetupHeaderButton.qml +++ b/resources/qml/PrintSetupHeaderButton.qml @@ -69,7 +69,7 @@ ToolButton { target: background color: UM.Theme.getColor("setting_control") - liningColor: UM.Theme.getColor("border_main_light") + liningColor: UM.Theme.getColor("border_main") } }, State diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index 440c9e4e78..6d3682d9ff 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -129,7 +129,7 @@ Item background: UM.UnderlineBackground { id: backgroundItem - liningColor: intentSelection.hovered ? UM.Theme.getColor("border_main_light") : UM.Theme.getColor("border_field_light") + liningColor: intentSelection.hovered ? UM.Theme.getColor("border_main") : UM.Theme.getColor("border_field_light") } UM.SimpleButton diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index 6b2ac55066..c3bc472fbe 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -135,7 +135,7 @@ SettingItem } if (control.hovered || control.activeFocus) { - return UM.Theme.getColor("border_main_light") + return UM.Theme.getColor("border_main") } return UM.Theme.getColor("border_field_light") } diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 1ac7afe967..2a4db2ab31 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -136,7 +136,7 @@ SettingItem } if (control.hovered || control.activeFocus) { - return UM.Theme.getColor("border_main_light") + return UM.Theme.getColor("border_main") } return UM.Theme.getColor("border_field_light") } diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 83b5d2a987..7aacad21da 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -52,7 +52,7 @@ SettingItem //Validation is OK. if(hovered || input.activeFocus) { - return UM.Theme.getColor("border_main_light") + return UM.Theme.getColor("border_main") } return UM.Theme.getColor("border_field_light") } diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index f84772e609..5d31348597 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -33,7 +33,7 @@ ComboBox { name: "highlighted" when: control.hovered || control.activeFocus - PropertyChanges { target: background; liningColor: UM.Theme.getColor("border_main_light")} + PropertyChanges { target: background; liningColor: UM.Theme.getColor("border_main")} } ] diff --git a/resources/qml/Widgets/TextField.qml b/resources/qml/Widgets/TextField.qml index 7803c17396..2dc0882b4b 100644 --- a/resources/qml/Widgets/TextField.qml +++ b/resources/qml/Widgets/TextField.qml @@ -44,7 +44,7 @@ TextField { name: "hovered" when: textField.hovered || textField.activeFocus - PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("border_main_light")} + PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("border_main")} } ] From fb42679d0800907c749f1ac36b37d0a128644509 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 13:39:50 +0100 Subject: [PATCH 16/24] Update TextField to match designs when disabled. CURA-8991 --- resources/qml/Widgets/TextField.qml | 19 ++++++++++--------- resources/themes/cura-light/theme.json | 8 ++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/resources/qml/Widgets/TextField.qml b/resources/qml/Widgets/TextField.qml index 2dc0882b4b..b708446d65 100644 --- a/resources/qml/Widgets/TextField.qml +++ b/resources/qml/Widgets/TextField.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -13,7 +13,7 @@ import Cura 1.1 as Cura // TextField { - id: textField + id: control property alias leftIcon: iconLeft.source @@ -22,7 +22,7 @@ TextField hoverEnabled: true selectByMouse: true font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") + color: UM.Theme.getColor("text_field_text") renderType: Text.NativeRendering selectionColor: UM.Theme.getColor("text_selection") leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width @@ -31,20 +31,21 @@ TextField State { name: "disabled" - when: !textField.enabled - PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")} + when: !control.enabled + PropertyChanges { target: control; color: UM.Theme.getColor("text_field_text_disabled")} + PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("text_field_border_disabled")} }, State { name: "invalid" - when: !textField.acceptableInput + when: !control.acceptableInput PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_validation_error_background")} }, State { name: "hovered" - when: textField.hovered || textField.activeFocus - PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("border_main")} + when: control.hovered || control.activeFocus + PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("text_field_border_hovered")} } ] @@ -66,7 +67,7 @@ TextField visible: source != "" height: UM.Theme.getSize("small_button_icon").height width: visible ? height : 0 - color: textField.color + color: control.color } } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index f96a45e32f..9ef04873c1 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -347,6 +347,14 @@ "radio_text": "text_default", "radio_text_disabled": "text_disabled", + "text_field": "background_1", + "text_field_border": [180, 180, 180, 255], + "text_field_border_hovered": "border_main", + "text_field_border_disabled": "border_main", + "text_field_text": "text_default", + "text_field_text_disabled": "text_disabled", + + "category_background": "background_2", From 7dabcfafb0d640bb0d2c6cd2d226e842304f496d Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 13:48:01 +0100 Subject: [PATCH 17/24] Add checkbox square coloring back. CURA-8991 --- resources/themes/cura-light/theme.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 9ef04873c1..9569ccfc53 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -332,6 +332,7 @@ "checkbox_border_disabled": "text_disabled", "checkbox_mark": "text_default", "checkbox_mark_disabled": "text_disabled", + "checkbox_square": [180, 180, 180, 255], "checkbox_text": "text_default", "checkbox_text_disabled": "text_disabled", From 1eb16c0ec558ed012c7db1a98cdaf78e7abecbeb Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 13:53:59 +0100 Subject: [PATCH 18/24] Update SettingTextField to match TextField CURA-8991 --- resources/qml/Settings/SettingTextField.qml | 10 +++++----- resources/themes/cura-light/theme.json | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 7aacad21da..68d206b96c 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -36,7 +36,7 @@ SettingItem { if(!enabled) { - return UM.Theme.getColor("setting_control_disabled_border") + return UM.Theme.getColor("text_field_border_disabled") } switch(propertyProvider.properties.validationState) { @@ -52,15 +52,15 @@ SettingItem //Validation is OK. if(hovered || input.activeFocus) { - return UM.Theme.getColor("border_main") + return UM.Theme.getColor("text_field_border_hovered") } - return UM.Theme.getColor("border_field_light") + return UM.Theme.getColor("text_field_border") } color: { if(!enabled) { - return UM.Theme.getColor("setting_control_disabled") + return UM.Theme.getColor("text_field") } switch(propertyProvider.properties.validationState) { @@ -76,7 +76,7 @@ SettingItem return UM.Theme.getColor("setting_validation_ok") default: - return UM.Theme.getColor("setting_control") + return UM.Theme.getColor("text_field") } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 9569ccfc53..5adb140802 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -355,8 +355,6 @@ "text_field_text": "text_default", "text_field_text_disabled": "text_disabled", - - "category_background": "background_2", "tooltip": [25, 25, 25, 255], From e1068fb3bc8c798083f0b8678891731c24da71e9 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 14:12:11 +0100 Subject: [PATCH 19/24] Replace Text.Align with custom enum alignment CURA-8943 --- plugins/Marketplace/resources/qml/PackageDetails.qml | 2 +- plugins/PostProcessingPlugin/PostProcessingPlugin.qml | 2 +- resources/qml/ActionPanel/OutputProcessWidget.qml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Marketplace/resources/qml/PackageDetails.qml b/plugins/Marketplace/resources/qml/PackageDetails.qml index 4bf32c53d7..6e5ec0fbf5 100644 --- a/plugins/Marketplace/resources/qml/PackageDetails.qml +++ b/plugins/Marketplace/resources/qml/PackageDetails.qml @@ -38,7 +38,7 @@ Item onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it. tooltip: catalog.i18nc("@button:tooltip", "Back") - toolTipContentAlignment: Text.AlignRight + toolTipContentAlignment: UM.Enums.ContentAlignment.AlignRight leftPadding: UM.Theme.getSize("narrow_margin").width rightPadding: leftPadding iconSource: UM.Theme.getIcon("ArrowLeft") diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index 7bb179e8ed..8ce6e3f94f 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -479,7 +479,7 @@ UM.Dialog } return tipText } - toolTipContentAlignment: Text.AlignLeft + toolTipContentAlignment: UM.Enums.ContentAlignment.AlignLeft onClicked: dialog.show() iconSource: "Script.svg" fixedWidthMode: false diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml index 13c910d9cc..1303dc20a2 100644 --- a/resources/qml/ActionPanel/OutputProcessWidget.qml +++ b/resources/qml/ActionPanel/OutputProcessWidget.qml @@ -128,7 +128,7 @@ Column tooltip: text fixedWidthMode: true - toolTipContentAlignment: Text.AlignLeft + toolTipContentAlignment: UM.Enums.ContentAlignment.AlignLeft onClicked: UM.Controller.setActiveStage("PreviewStage") } From 719257bb63b1dafcaa69bbd3158584cc313d3e74 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 15:05:30 +0100 Subject: [PATCH 20/24] Update validation colors to match new designs CURA-8991 --- resources/qml/Settings/SettingTextField.qml | 8 ------- resources/themes/cura-dark/theme.json | 21 ++++++++++++++----- resources/themes/cura-light/theme.json | 23 ++++++++++++++++----- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 68d206b96c..95976ad58e 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -80,14 +80,6 @@ SettingItem } } - Rectangle - { - anchors.fill: parent - anchors.margins: Math.round(UM.Theme.getSize("default_lining").width) - color: UM.Theme.getColor("setting_control_highlight") - opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35 - } - UM.Label { anchors diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index bc1f6e3b9f..afd36e8741 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -23,7 +23,20 @@ "text_primary_button": [255, 255, 255, 255], "text_secondary_button": [255, 255, 255, 255], "text_link_hover": [156, 195, 255, 255], - "text_lighter": [243, 243, 243, 255] + "text_lighter": [243, 243, 243, 255], + + "um_green_1": [233, 245, 237, 255], + "um_green_5": [36, 162, 73, 255], + "um_green_9": [31, 44, 36, 255], + "um_red_1": [251, 232, 233, 255], + "um_red_5": [218, 30, 40, 255], + "um_red_9": [59, 31, 33, 255], + "um_orange_1": [255, 235, 221, 255], + "um_orange_5": [252, 123, 30, 255], + "um_orange_9": [64, 45, 32, 255], + "um_yellow_1": [255, 248, 225, 255], + "um_yellow_5": [253, 209, 58, 255], + "um_yellow_9": [64, 58, 36, 255] }, "colors": { @@ -140,10 +153,8 @@ "setting_control_disabled_text": [255, 255, 255, 101], "setting_control_disabled_border": [255, 255, 255, 101], "setting_unit": [255, 255, 255, 127], - "setting_validation_error_background": [59, 31, 53, 255], - "setting_validation_error": [212, 31, 53, 255], - "setting_validation_warning_background": [62, 54, 46, 255], - "setting_validation_warning": [245, 166, 35, 255], + "setting_validation_error_background": "um_red_9", + "setting_validation_warning_background": "um_yellow_9", "setting_validation_ok": "background_2", "progressbar_background": [255, 255, 255, 48], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 5adb140802..4d89c37609 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -188,7 +188,20 @@ "text_primary_button": [255, 255, 255, 255], "text_secondary_button": [25, 110, 240, 255], "text_link_hover": [16, 70, 156, 255], - "text_lighter": [108, 108, 108, 255] + "text_lighter": [108, 108, 108, 255], + + "um_green_1": [233, 245, 237, 255], + "um_green_5": [36, 162, 73, 255], + "um_green_9": [31, 44, 36, 255], + "um_red_1": [251, 232, 233, 255], + "um_red_5": [218, 30, 40, 255], + "um_red_9": [59, 31, 33, 255], + "um_orange_1": [255, 235, 221, 255], + "um_orange_5": [252, 123, 30, 255], + "um_orange_9": [64, 45, 32, 255], + "um_yellow_1": [255, 248, 225, 255], + "um_yellow_5": [253, 209, 58, 255], + "um_yellow_9": [64, 58, 36, 255] }, "colors": { @@ -304,10 +317,10 @@ "setting_control_disabled_text": [127, 127, 127, 255], "setting_control_disabled_border": [127, 127, 127, 255], "setting_unit": [127, 127, 127, 255], - "setting_validation_error_background": [255, 66, 60, 255], - "setting_validation_error": [127, 127, 127, 255], - "setting_validation_warning_background": [255, 145, 62, 255], - "setting_validation_warning": [127, 127, 127, 255], + "setting_validation_error_background": "um_red_1", + "setting_validation_error": "um_red_5", + "setting_validation_warning_background": "um_yellow_1", + "setting_validation_warning": "um_yellow_5", "setting_validation_ok": "background_2", "material_compatibility_warning": [243, 166, 59, 255], From 7b0e954f121f9278dd78957344db9fc668cb6701 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 4 Mar 2022 15:20:46 +0100 Subject: [PATCH 21/24] Change machine setting page text box text highlight color to match designs. CURA-8991 --- resources/qml/MachineSettings/NumericTextFieldWithUnit.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml index 18c3f8bbe5..67840d4f26 100644 --- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml +++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml @@ -77,6 +77,8 @@ UM.TooltipArea anchors.left: fieldLabel.right anchors.leftMargin: UM.Theme.getSize("default_margin").width verticalAlignment: Text.AlignVCenter + selectionColor: UM.Theme.getColor("text_selection") + selectedTextColor: UM.Theme.getColor("setting_control_text") padding: 0 leftPadding: UM.Theme.getSize("narrow_margin").width width: numericTextFieldWithUnit.controlWidth From 58ca09e1c6ec44d3a7ce84f6e296a019ebb536b2 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Mon, 7 Mar 2022 10:43:46 +0100 Subject: [PATCH 22/24] 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 23/24] 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 From 64e3e8b31dd483be878f5ed8f99074d8f081651d Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Mon, 7 Mar 2022 11:31:24 +0100 Subject: [PATCH 24/24] Use template literals to format string --- resources/qml/Toolbar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 2b79f22957..32de5b76ca 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -55,7 +55,7 @@ Item delegate: UM.ToolbarButton { - text: model.name + (model.shortcut ? (" (" + model.shortcut + ")") : "") + text: model.name + (model.shortcut ? ` ("${model.shortcut}")` : "") checkable: true checked: model.active enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled