From b4edb89eb8635abcfdebba0ef54f9adea2034dce Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 28 Feb 2022 10:21:16 +0100 Subject: [PATCH 1/7] Align menubar colors with new designs. CURA-8688 --- resources/qml/Widgets/MenuItem.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/qml/Widgets/MenuItem.qml b/resources/qml/Widgets/MenuItem.qml index aacc5354cd..36098e1197 100644 --- a/resources/qml/Widgets/MenuItem.qml +++ b/resources/qml/Widgets/MenuItem.qml @@ -48,7 +48,6 @@ UM.MenuItem y: UM.Theme.getSize("default_lining").width width: menuItem.width - 2 * UM.Theme.getSize("default_lining").width height: menuItem.height - 2 * UM.Theme.getSize("default_lining").height - - color: menuItem.highlighted ? UM.Theme.getColor("secondary"): UM.Theme.getColor("setting_control_highlight") + color: menuItem.highlighted ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1") } } \ No newline at end of file From 440d6fa5250bd763b1e5026ee7da23e2f043fe95 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 28 Feb 2022 11:20:31 +0100 Subject: [PATCH 2/7] Update style of TextFIeld and ComboxBox to match new designs. Remove borders and radius on corners. Update Prefereces title to be bold and centered with button Make prefereces pages selection buttons correct height. CURA-8688 --- resources/qml/Widgets/ComboBox.qml | 10 +--------- resources/qml/Widgets/TextField.qml | 27 ++++----------------------- 2 files changed, 5 insertions(+), 32 deletions(-) diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index 6420f41823..121c5f15da 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -26,7 +26,6 @@ ComboBox { name: "disabled" when: !control.enabled - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_disabled_border")} PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")} PropertyChanges { target: contentLabel; color: UM.Theme.getColor("setting_control_disabled_text")} }, @@ -34,20 +33,13 @@ ComboBox { name: "highlighted" when: control.hovered || control.activeFocus - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_border_highlight") } PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_highlight")} } ] - background: Rectangle + background: UM.UnderlineBackground { id: backgroundRectangle - color: UM.Theme.getColor("setting_control") - - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: UM.Theme.getColor("setting_control_border") - } indicator: UM.RecolorImage diff --git a/resources/qml/Widgets/TextField.qml b/resources/qml/Widgets/TextField.qml index b995c34f10..bace79a98a 100644 --- a/resources/qml/Widgets/TextField.qml +++ b/resources/qml/Widgets/TextField.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -17,6 +17,8 @@ TextField property alias leftIcon: iconLeft.source + height: UM.Theme.getSize("setting_control").height + hoverEnabled: true selectByMouse: true font: UM.Theme.getFont("default") @@ -29,45 +31,24 @@ TextField { name: "disabled" when: !textField.enabled - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_disabled_border")} PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")} }, State { name: "invalid" when: !textField.acceptableInput - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_validation_error")} PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_validation_error_background")} }, State { name: "hovered" when: textField.hovered || textField.activeFocus - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_border_highlight") } } ] - background: Rectangle + background: UM.UnderlineBackground { id: backgroundRectangle - - color: UM.Theme.getColor("main_background") - - radius: UM.Theme.getSize("setting_control_radius").width - - border.color: - { - if (!textField.enabled) - { - return UM.Theme.getColor("setting_control_disabled_border") - } - if (textField.hovered || textField.activeFocus) - { - return UM.Theme.getColor("setting_control_border_highlight") - } - return UM.Theme.getColor("setting_control_border") - } - //Optional icon added on the left hand side. UM.RecolorImage { From 26262e3cac183798796505eb112fc58050085a0d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 11:26:18 +0100 Subject: [PATCH 3/7] Fix marketplace opening --- resources/qml/Actions.qml | 8 -------- resources/qml/MainWindow/ApplicationMenu.qml | 7 ++++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 92c9051491..4e2a05a6aa 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -71,7 +71,6 @@ Item property alias configureSettingVisibility: configureSettingVisibilityAction property alias browsePackages: browsePackagesAction - property alias openMarketplace: openMarketplaceAction UM.I18nCatalog{id: catalog; name: "cura"} @@ -483,11 +482,4 @@ Item text: "&Marketplace" icon.name: "plugins_browse" } - - Action - { - id: openMarketplaceAction - text: catalog.i18nc("@action:menu", "&Marketplace") - icon.name: "plugins_browse" - } } diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index e6bf52a6bc..0ed1662943 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -97,7 +97,8 @@ Item target: Cura.Actions.browsePackages function onTriggered() { - extensionMenu.extensionModel.callExtensionMethod("Toolbox", "launch") + print("beepboop") + extensionMenu.extensionModel.callExtensionMethod("Marketplace", "show") } } @@ -107,8 +108,8 @@ Item target: Cura.Actions.marketplaceMaterials function onTriggered() { - extensionMenu.extensionModel.callExtensionMethod("Toolbox", "launch") - extensionMenu.extensionModel.callExtensionMethod("Toolbox", "setViewCategoryToMaterials") + extensionMenu.extensionModel.callExtensionMethod("Marketplace", "show") + extensionMenu.extensionModel.callExtensionMethod("Marketplace", "setVisibleTabToMaterials") } } } From 7fd6601b1ac323b03b6e2b302d6d71962dad59d6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 11:37:51 +0100 Subject: [PATCH 4/7] Apply theming to perObjectCategory CURA-8688 --- .../PerObjectSettingsTool/PerObjectCategory.qml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectCategory.qml b/plugins/PerObjectSettingsTool/PerObjectCategory.qml index 1800555b9d..eae74eeb4c 100644 --- a/plugins/PerObjectSettingsTool/PerObjectCategory.qml +++ b/plugins/PerObjectSettingsTool/PerObjectCategory.qml @@ -28,8 +28,8 @@ Button { 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 + source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight") + color: base.hovered ? UM.Theme.getColor("primary_button_hover"): UM.Theme.getColor("primary_button_text") } } UM.RecolorImage @@ -38,22 +38,20 @@ Button { height: label.height width: height source: UM.Theme.getIcon(definition.icon) - color: base.hovered ? palette.highlight : palette.buttonText + color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("primary_button_text") } UM.Label { id: label anchors.verticalCenter: parent.verticalCenter text: base.text - color: base.hovered ? palette.highlight : palette.buttonText + color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("primary_button_text") font.bold: true } - - SystemPalette { id: palette } } - signal showTooltip(string text); - signal hideTooltip(); + signal showTooltip(string text) + signal hideTooltip() signal contextMenuRequested() text: definition.label From 78c19559d26af068443a542593c4fe3c66e7188f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 11:41:56 +0100 Subject: [PATCH 5/7] Ensure that Cura styling is applied to the workspace summary dialog CURA-8688 --- .../qml/Dialogs/WorkspaceSummaryDialog.qml | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/resources/qml/Dialogs/WorkspaceSummaryDialog.qml b/resources/qml/Dialogs/WorkspaceSummaryDialog.qml index 27a7fd734f..00c4fb8f50 100644 --- a/resources/qml/Dialogs/WorkspaceSummaryDialog.qml +++ b/resources/qml/Dialogs/WorkspaceSummaryDialog.qml @@ -45,11 +45,7 @@ UM.Dialog visibilityHandler: UM.SettingPreferenceVisibilityHandler { } } - SystemPalette - { - id: palette - } - Label + UM.Label { id: mainHeading width: parent.width @@ -86,7 +82,7 @@ UM.Dialog spacing: UM.Theme.getSize("default_margin").height Column { - Label + UM.Label { id: settingsHeading text: catalog.i18nc("@action:label", "Printer settings") @@ -96,14 +92,14 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Type") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { - text: (Cura.MachineManager.activeMachine == null) ? "" : Cura.MachineManager.activeMachine.definition.name + text: Cura.MachineManager.activeMachine == null ? "" : Cura.MachineManager.activeMachine.definition.name width: Math.floor(scroll.width / 3) | 0 } } @@ -111,12 +107,12 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: Cura.MachineManager.activeMachineNetworkGroupName != "" ? catalog.i18nc("@action:label", "Printer Group") : catalog.i18nc("@action:label", "Name") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: { @@ -155,7 +151,7 @@ UM.Dialog var material_name = extruder.material.name return (material_name !== undefined) ? material_name : "" } - Label + UM.Label { text: { var extruder = Number(modelData.position) @@ -179,7 +175,7 @@ UM.Dialog width: parent.width height: childrenRect.height - Label + UM.Label { text: { @@ -192,7 +188,7 @@ UM.Dialog width: Math.floor(scroll.width / 3) | 0 enabled: modelData.isEnabled } - Label + UM.Label { text: { @@ -212,7 +208,7 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Profile settings") font.bold: true @@ -220,12 +216,12 @@ UM.Dialog Row { width: parent.width - Label + UM.Label { text: catalog.i18nc("@action:label", "Not in profile") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", Cura.MachineManager.numUserSettings).arg(Cura.MachineManager.numUserSettings) width: Math.floor(scroll.width / 3) | 0 @@ -236,12 +232,12 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Name") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: Cura.MachineManager.activeQualityOrQualityChangesName width: Math.floor(scroll.width / 3) | 0 @@ -253,12 +249,12 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Intent") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: Cura.MachineManager.activeIntentCategory width: Math.floor(scroll.width / 3) | 0 @@ -273,7 +269,7 @@ UM.Dialog leftButtons: [ - CheckBox + UM.CheckBox { id: dontShowAgainCheckbox anchors.left: parent.left From 7da5903ce3b3731636ffb90476d20a304808ae6e Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 28 Feb 2022 11:43:59 +0100 Subject: [PATCH 6/7] Update RadioButton to new style CURA-8688 --- resources/qml/Widgets/RadioButton.qml | 30 +++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/resources/qml/Widgets/RadioButton.qml b/resources/qml/Widgets/RadioButton.qml index 18347b69da..96c2d95f56 100644 --- a/resources/qml/Widgets/RadioButton.qml +++ b/resources/qml/Widgets/RadioButton.qml @@ -17,6 +17,31 @@ RadioButton font: UM.Theme.getFont("default") + states: [ + State { + name: "checked" + when: radioButton.checked + PropertyChanges + { + target: indicator + color: UM.Theme.getColor("accent_1") + border.width: 0 + } + }, + State + { + name: "disabled" + when: !radioButton.enabled + PropertyChanges { target: indicator; color: UM.Theme.getColor("background_1")} + }, + State + { + name: "highlighted" + when: radioButton.hovered || radioButton.activeFocus + PropertyChanges { target: indicator; border.color: UM.Theme.getColor("accent_1")} + } + ] + background: Item { anchors.fill: parent @@ -29,8 +54,9 @@ RadioButton anchors.verticalCenter: parent.verticalCenter anchors.alignWhenCentered: false radius: width / 2 + color: UM.Theme.getColor("background_2") border.width: UM.Theme.getSize("default_lining").width - border.color: radioButton.hovered ? UM.Theme.getColor("small_button_text") : UM.Theme.getColor("small_button_text_hover") + border.color: UM.Theme.getColor("text_disabled") Rectangle { @@ -38,7 +64,7 @@ RadioButton height: width anchors.centerIn: parent radius: width / 2 - color: radioButton.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("primary_button") + color: radioButton.enabled ? UM.Theme.getColor("background_2") : UM.Theme.getColor("background_1") visible: radioButton.checked } } From 8d3a5ac7e4a3c63881d75f6cbd64ee8e6bab7387 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 11:47:10 +0100 Subject: [PATCH 7/7] Ensure AskOpenAsProjectOrModel dialog uses cura styling CURA-8688 --- resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml b/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml index 3bd72bf68f..23e01b5e46 100644 --- a/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml +++ b/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml @@ -76,7 +76,7 @@ UM.Dialog anchors.fill: parent spacing: UM.Theme.getSize("default_margin").height - Label + UM.Label { id: questionText width: parent.width