From 9735daf4974d2ddc22ba9df752fa817751848852 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 29 Jun 2021 16:21:39 +0200 Subject: [PATCH 01/40] Replace the extruder icon with the new design CURA-8011 --- resources/qml/ExtruderIcon.qml | 51 +++++++------------ .../cura-light/icons/medium/ExtruderColor.svg | 11 ++++ 2 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 resources/themes/cura-light/icons/medium/ExtruderColor.svg diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index 1c93966519..2d21ed9e13 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -1,7 +1,7 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.7 +import QtQuick 2.11 import QtQuick.Controls 1.1 import UM 1.2 as UM @@ -17,29 +17,26 @@ Item property alias textColor: extruderNumberText.color property bool extruderEnabled: true - UM.RecolorImage + Item { - id: mainIcon + opacity: extruderEnabled ? 1 : 0.4 anchors.fill: parent - source: UM.Theme.getIcon("Extruder", "medium") - color: extruderEnabled ? materialColor: UM.Theme.getColor("disabled") - } - - Rectangle - { - id: extruderNumberCircle - - width: height - height: Math.round(parent.height / 2) - radius: Math.round(width) - color: UM.Theme.getColor("toolbar_background") - - anchors + UM.RecolorImage { - horizontalCenter: parent.horizontalCenter - top: parent.top - topMargin: (parent.height - height) / 2 + id: blorp + anchors.fill: parent + + source: UM.Theme.getIcon("ExtruderColor", "medium") + color: materialColor + } + UM.RecolorImage + { + id: mainIcon + anchors.fill: parent + + source: UM.Theme.getIcon("Extruder", "medium") + color: UM.Theme.getColor("text") } Label @@ -51,21 +48,9 @@ Item color: UM.Theme.getColor("text") width: contentWidth height: contentHeight - visible: extruderEnabled renderType: Text.NativeRendering horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } - - UM.RecolorImage - { - id: disabledIcon - anchors.fill: parent - anchors.margins: UM.Theme.getSize("thick_lining").width - sourceSize.height: width - source: UM.Theme.getIcon("Cancel") - visible: !extruderEnabled - color: UM.Theme.getColor("text") - } } } diff --git a/resources/themes/cura-light/icons/medium/ExtruderColor.svg b/resources/themes/cura-light/icons/medium/ExtruderColor.svg new file mode 100644 index 0000000000..c017c69106 --- /dev/null +++ b/resources/themes/cura-light/icons/medium/ExtruderColor.svg @@ -0,0 +1,11 @@ + + + + + + + + + From 53fd47e8db8206c43ad563697e744fd591c0f0c8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 29 Jun 2021 16:26:59 +0200 Subject: [PATCH 02/40] Set opacity of disabled extruder text CURA-8011 --- resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index ad4911404a..b088abc830 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -70,7 +70,7 @@ Cura.ExpandablePopup font: UM.Theme.getFont("default") color: UM.Theme.getColor("text") renderType: Text.NativeRendering - + opacity: model.enabled ? 1 : 0.4 anchors { top: extruderIcon.top @@ -92,7 +92,7 @@ Cura.ExpandablePopup font: UM.Theme.getFont("default_bold") color: UM.Theme.getColor("text") renderType: Text.NativeRendering - + opacity: model.enabled ? 1 : 0.4 anchors { left: extruderIcon.right From c3a7cd59beb920377e6a09f4f1d9cfb86ac02932 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 12:24:49 +0200 Subject: [PATCH 03/40] Add medium quality "Folder" icon CURA-8202 --- plugins/PrepareStage/PrepareMenu.qml | 2 +- resources/themes/cura-light/icons/medium/Folder.svg | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 resources/themes/cura-light/icons/medium/Folder.svg diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 73c2cad39a..09bb2a9fc1 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -97,7 +97,7 @@ Item { id: buttonIcon anchors.centerIn: parent - source: UM.Theme.getIcon("Folder") + source: UM.Theme.getIcon("Folder", "medium") width: UM.Theme.getSize("button_icon").width height: UM.Theme.getSize("button_icon").height color: UM.Theme.getColor("icon") diff --git a/resources/themes/cura-light/icons/medium/Folder.svg b/resources/themes/cura-light/icons/medium/Folder.svg new file mode 100644 index 0000000000..8dc9b5ea9f --- /dev/null +++ b/resources/themes/cura-light/icons/medium/Folder.svg @@ -0,0 +1,11 @@ + + + + + + + + + From 72ca4a9564e4c26d23b5dadb72d86c8501db8199 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 12:25:28 +0200 Subject: [PATCH 04/40] Use medium quality Printer icon in the MachineSelector CURA-8202 --- resources/qml/PrinterSelector/MachineSelector.qml | 4 ++-- .../themes/cura-light/icons/medium/Printer.svg | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 resources/themes/cura-light/icons/medium/Printer.svg diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 7c74be1605..712a81d6dd 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -93,11 +93,11 @@ Cura.ExpandablePopup { if (isGroup) { - return UM.Theme.getIcon("PrinterTriple") + return UM.Theme.getIcon("PrinterTriple", "medium") } else if (isNetworkPrinter || isCloudRegistered) { - return UM.Theme.getIcon("Printer") + return UM.Theme.getIcon("Printer", "medium") } else { diff --git a/resources/themes/cura-light/icons/medium/Printer.svg b/resources/themes/cura-light/icons/medium/Printer.svg new file mode 100644 index 0000000000..ef67996d48 --- /dev/null +++ b/resources/themes/cura-light/icons/medium/Printer.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + From 3eafd115872d668c7309ddbb15cf840ec75513bc Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 12:26:13 +0200 Subject: [PATCH 05/40] Fix qml warning about the sourceSize of the ToolbarButton icon CURA-8202 --- resources/qml/Toolbar.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index ec4d29420b..c948bb8242 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -68,7 +68,8 @@ Item source: UM.Theme.getIcon(model.icon) != "" ? UM.Theme.getIcon(model.icon) : "file:///" + model.location + "/" + model.icon color: UM.Theme.getColor("icon") - sourceSize: Math.round(UM.Theme.getSize("button") / 2) + sourceSize.height: Math.round(UM.Theme.getSize("button").height / 2) + sourceSize.width: Math.round(UM.Theme.getSize("button").width / 2) } onCheckedChanged: From 4583866f57f11e77fbb3b48d63715f54ba995637 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 12:28:08 +0200 Subject: [PATCH 06/40] Add toolbar button icon size Which is slightly smaller than the button icon CURA-8202 --- .../PrintSetupSelector/PrintSetupSelectorHeader.qml | 6 +++++- resources/themes/cura-light/styles.qml | 10 +++++----- resources/themes/cura-light/theme.json | 5 ++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml index ff9204655f..6dd909105d 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml @@ -15,7 +15,8 @@ RowLayout Cura.IconWithText { - source: UM.Theme.getIcon("PrintQuality") + source: UM.Theme.getIcon("Sliders", "medium") + iconSize: UM.Theme.getSize("button_icon").width text: { if (Cura.MachineManager.activeStack) @@ -53,6 +54,7 @@ RowLayout source: UM.Theme.getIcon("Infill1") text: Cura.MachineManager.activeStack ? parseInt(infillDensity.properties.value) + "%" : "0%" font: UM.Theme.getFont("medium") + iconSize: UM.Theme.getSize("toolbar_button_icon").width UM.SettingPropertyProvider { @@ -68,6 +70,7 @@ RowLayout source: UM.Theme.getIcon("Support") text: supportEnabled.properties.value == "True" ? enabledText : disabledText font: UM.Theme.getFont("medium") + iconSize: UM.Theme.getSize("toolbar_button_icon").width UM.SettingPropertyProvider { @@ -83,6 +86,7 @@ RowLayout source: UM.Theme.getIcon("Adhesion") text: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" ? enabledText : disabledText font: UM.Theme.getFont("medium") + iconSize: UM.Theme.getSize("toolbar_button_icon").width UM.SettingPropertyProvider { diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index de15866f1a..62c673c584 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -175,8 +175,8 @@ QtObject { background: Item { - implicitWidth: UM.Theme.getSize("button").width - implicitHeight: UM.Theme.getSize("button").height + implicitWidth: UM.Theme.getSize("toolbar_button").width + implicitHeight: UM.Theme.getSize("toolbar_button").height UM.PointingRectangle { @@ -252,11 +252,11 @@ QtObject anchors.centerIn: parent opacity: control.enabled ? 1.0 : 0.2 source: control.iconSource - width: UM.Theme.getSize("button_icon").width - height: UM.Theme.getSize("button_icon").height + width: UM.Theme.getSize("toolbar_button_icon").width + height: UM.Theme.getSize("toolbar_button_icon").height color: UM.Theme.getColor("icon") - sourceSize: UM.Theme.getSize("button_icon") + sourceSize: UM.Theme.getSize("toolbar_button_icon") } } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 5245d21455..e190f3fc97 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -482,7 +482,7 @@ "machine_selector_widget": [20.0, 4.0], "machine_selector_widget_content": [25.0, 32.0], - "machine_selector_icon": [2.66, 2.66], + "machine_selector_icon": [2.5, 2.5], "views_selector": [23.0, 4.0], @@ -527,6 +527,9 @@ "button_icon": [2.5, 2.5], "button_lining": [0, 0], + "toolbar_button": [4, 4], + "toolbar_button_icon": [2, 2], + "action_button": [15.0, 2.5], "action_button_icon": [1.0, 1.0], "action_button_radius": [0.15, 0.15], From 6cf25aa540d48b082de4677c2ccde1583fadbc20 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 12:28:46 +0200 Subject: [PATCH 07/40] Make the icons in the recommended window same size as the toolbar icons CURA-8202 --- .../Recommended/RecommendedAdhesionSelector.qml | 1 + .../Recommended/RecommendedInfillDensitySelector.qml | 1 + .../Recommended/RecommendedQualityProfileSelector.qml | 1 + .../Recommended/RecommendedSupportSelector.qml | 1 + 4 files changed, 4 insertions(+) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml index df2c1bfae6..40d1e890dc 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml @@ -29,6 +29,7 @@ Item text: catalog.i18nc("@label", "Adhesion") font: UM.Theme.getFont("medium") width: labelColumnWidth + iconSize: UM.Theme.getSize("toolbar_button_icon").width } Item diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index 8da97437cf..d78c63c803 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -65,6 +65,7 @@ Item text: catalog.i18nc("@label", "Infill") + " (%)" font: UM.Theme.getFont("medium") width: labelColumnWidth + iconSize: UM.Theme.getSize("toolbar_button_icon").width } Item diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index a8e19c7357..3c54c37785 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -52,6 +52,7 @@ Item text: catalog.i18nc("@label", "Profiles") font: UM.Theme.getFont("medium") width: labelColumnWidth + iconSize: UM.Theme.getSize("toolbar_button_icon").width } UM.SimpleButton { diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 924dcd5ec4..50327d364b 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -30,6 +30,7 @@ Item text: catalog.i18nc("@label", "Support") font: UM.Theme.getFont("medium") width: labelColumnWidth + iconSize: UM.Theme.getSize("toolbar_button_icon").width } Item From d7779c42dfa6c599efd77f1494cebafe78908211 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 12:29:18 +0200 Subject: [PATCH 08/40] Add medium quality Sliders icon Which is now used in the print settings header CURA-8202 --- .../themes/cura-light/icons/medium/Sliders.svg | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 resources/themes/cura-light/icons/medium/Sliders.svg diff --git a/resources/themes/cura-light/icons/medium/Sliders.svg b/resources/themes/cura-light/icons/medium/Sliders.svg new file mode 100644 index 0000000000..91bd9ae0fd --- /dev/null +++ b/resources/themes/cura-light/icons/medium/Sliders.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + From eb2fe5b139bd789ff8c2da7340c1b7fb77f30187 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 12:30:04 +0200 Subject: [PATCH 09/40] Change the size of the stage buttons to be same size as the marketplace button CURA-8202 --- resources/qml/MainWindow/MainWindowHeader.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index cb7d5c3d88..c670abb67a 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -62,7 +62,7 @@ Item anchors.verticalCenter: parent.verticalCenter exclusiveGroup: mainWindowHeaderMenuGroup style: UM.Theme.styles.main_window_header_tab - height: UM.Theme.getSize("main_window_header_button").height + height: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) iconSource: model.stage.iconSource property color overlayColor: "transparent" From 061e88937183919f8e3f09fb74da4e765b65c8bf Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 13:09:29 +0200 Subject: [PATCH 10/40] Fix height binding loop in the account details popup CURA-8202 --- resources/qml/Account/UserOperations.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Account/UserOperations.qml b/resources/qml/Account/UserOperations.qml index 19e92e0249..6d83e628f7 100644 --- a/resources/qml/Account/UserOperations.qml +++ b/resources/qml/Account/UserOperations.qml @@ -18,7 +18,7 @@ Column { id: accountInfo width: childrenRect.width - height: childrenRect.height + height: accountSyncDetailsColumn.height anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width AvatarImage @@ -56,6 +56,7 @@ Column Column { + id: accountSyncDetailsColumn anchors.left: avatar.right anchors.leftMargin: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("narrow_margin").height From 3c2e336153745a0fcbb2f451f299a62a9de96acc Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 15:17:37 +0200 Subject: [PATCH 11/40] Align the printer status icon properly CURA-8202 --- resources/qml/PrinterSelector/MachineSelector.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 712a81d6dd..dfe51df859 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -114,8 +114,9 @@ Cura.ExpandablePopup anchors { bottom: parent.bottom + bottomMargin: - height * 1 / 6 left: parent.left - leftMargin: UM.Theme.getSize("thick_margin").width + leftMargin: iconSize - width * 5 / 6 } source: From 9d70ea8a8aa38cbde40a365e45445acc789b9c38 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 30 Jun 2021 15:18:12 +0200 Subject: [PATCH 12/40] Size the avatar icon with the same height as the marketplace button CURA-8202 --- resources/qml/Account/AccountWidget.qml | 13 +++++++------ resources/qml/Account/UserOperations.qml | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index 48c05f8a11..ef1622daee 100644 --- a/resources/qml/Account/AccountWidget.qml +++ b/resources/qml/Account/AccountWidget.qml @@ -54,9 +54,10 @@ Item id: accountWidget anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: signInButton.horizontalCenter - implicitHeight: UM.Theme.getSize("main_window_header").height - implicitWidth: UM.Theme.getSize("main_window_header").height + implicitHeight: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) + implicitWidth: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) hoverEnabled: true @@ -68,8 +69,8 @@ Item { id: avatar - width: Math.round(0.8 * accountWidget.width) - height: Math.round(0.8 * accountWidget.height) + width: accountWidget.width + height: accountWidget.height anchors.verticalCenter: accountWidget.verticalCenter anchors.horizontalCenter: accountWidget.horizontalCenter @@ -86,7 +87,7 @@ Item { id: initialCircle anchors.centerIn: parent - width: Math.min(parent.width, parent.height) + width: Math.min(accountWidget.width, accountWidget.height) height: width radius: width color: accountWidget.hovered ? UM.Theme.getColor("primary_text") : "transparent" @@ -141,7 +142,7 @@ Item borderColor: UM.Theme.getColor("lining") borderWidth: UM.Theme.getSize("default_lining").width - target: Qt.point(width - (accountWidget.width / 2), -10) + target: Qt.point(width - (signInButton.width / 2), -10) arrowSize: UM.Theme.getSize("default_arrow").width } diff --git a/resources/qml/Account/UserOperations.qml b/resources/qml/Account/UserOperations.qml index 6d83e628f7..f5241596d5 100644 --- a/resources/qml/Account/UserOperations.qml +++ b/resources/qml/Account/UserOperations.qml @@ -9,7 +9,7 @@ import Cura 1.1 as Cura Column { - spacing: UM.Theme.getSize("narrow_margin").height + spacing: UM.Theme.getSize("default_margin").height topPadding: UM.Theme.getSize("default_margin").height bottomPadding: UM.Theme.getSize("default_margin").height width: childrenRect.width From 0a2407e6ed30dbc580d957b0f6515a170fd3e0da Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 09:46:24 +0200 Subject: [PATCH 13/40] Reduce the size of the magnifier in the setting search CURA-8202 --- resources/qml/Settings/SettingView.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index f038d15ca3..cb49f0549c 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -65,7 +65,13 @@ Item anchors.right: clearFilterButton.left anchors.rightMargin: Math.round(UM.Theme.getSize("thick_margin").width) - placeholderText: "" + "
" + catalog.i18nc("@label:textbox", "Search settings") + placeholderText: + { + var imageSize = "width='" + UM.Theme.getSize("small_button_icon").width + "' height='" + UM.Theme.getSize("small_button_icon").height + var imageSource = "' src='"+ UM.Theme.getIcon("Magnifier") + var searchPlaceholder = catalog.i18nc("@label:textbox", "Search settings") + return "" + "
" + searchPlaceholder + } style: TextFieldStyle { From a996b631bb0e45c2cecce4f1a81ac3152e66c06c Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 09:49:48 +0200 Subject: [PATCH 14/40] Increase the size of the hamburger menu CURA-8202 --- resources/qml/Settings/SettingView.qml | 4 ++-- resources/themes/cura-light/theme.json | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index cb49f0549c..fc920a30e7 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -194,8 +194,8 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height + width: UM.Theme.getSize("medium_button_icon").width + height: UM.Theme.getSize("medium_button_icon").height sourceSize.width: width sourceSize.height: height color: control.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index e190f3fc97..984681b8da 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -507,8 +507,8 @@ "section": [0.0, 2], "section_control": [0, 1], - "section_icon": [1.6, 1.6], - "section_icon_column": [2.8, 0.0], + "section_icon": [2, 2], + "section_icon_column": [2.5, 2.5], "rating_star": [1.0, 1.0], "setting": [25.0, 1.8], @@ -540,6 +540,9 @@ "small_button": [2, 2], "small_button_icon": [1.5, 1.5], + "medium_button": [2.5, 2.5], + "medium_button_icon": [2, 2], + "favorites_row": [2, 2], "favorites_button": [2, 2], "favorites_button_icon": [1.2, 1.2], From 4ef7fcf6e40f2d8c51636db6ae0835f00c9b7499 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 09:53:51 +0200 Subject: [PATCH 15/40] Increase the size of the small buttons in the setting category Also, fix the misalignment of the background rectangle, which made the category icons seem not-centered. CURA-8202 --- resources/qml/Settings/SettingCategory.qml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index a42db9cdcb..5beb6e209e 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -16,10 +16,13 @@ Button anchors.rightMargin: 2 * UM.Theme.getSize("thin_margin").width hoverEnabled: true + height: UM.Theme.getSize("section_icon_column").height + background: Rectangle { id: backgroundRectangle height: UM.Theme.getSize("section").height + anchors.verticalCenter: parent.verticalCenter color: { if (!base.enabled) @@ -107,8 +110,8 @@ Button source: UM.Theme.getIcon(definition.icon) width: UM.Theme.getSize("section_icon").width height: UM.Theme.getSize("section_icon").height - sourceSize.width: width + 15 * screenScaleFactor - sourceSize.height: width + 15 * screenScaleFactor + sourceSize.width: width + sourceSize.height: width } onClicked: @@ -141,8 +144,8 @@ Button id: settingsButton visible: base.hovered || settingsButton.hovered - height: Math.round(base.height * 0.6) - width: Math.round(base.height * 0.6) + height: UM.Theme.getSize("small_button_icon").height + width: height anchors { @@ -184,7 +187,7 @@ Button return false } - height: Math.round(parent.height / 2) + height: UM.Theme.getSize("small_button_icon").height width: height onClicked: From 0478c127bfcfc220160b09989167b90341cae240 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 09:54:31 +0200 Subject: [PATCH 16/40] Increase the size of the auxiliary buttons in the setting items CURA-8202 --- resources/qml/Settings/SettingItem.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index a377d08cfc..35172fc799 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -156,7 +156,7 @@ Item { id: settingControls - height: UM.Theme.getSize("section_control").height + height: UM.Theme.getSize("small_button_icon").height spacing: Math.round(UM.Theme.getSize("thick_margin").height / 2) anchors @@ -174,6 +174,7 @@ Item anchors.top: parent.top anchors.bottom: parent.bottom + height: UM.Theme.getSize("small_button_icon").height width: height color: UM.Theme.getColor("setting_control_button") @@ -203,6 +204,7 @@ Item anchors.top: parent.top anchors.bottom: parent.bottom + height: UM.Theme.getSize("small_button_icon").height width: height color: UM.Theme.getColor("setting_control_button") @@ -286,6 +288,7 @@ Item anchors.top: parent.top anchors.bottom: parent.bottom + height: UM.Theme.getSize("small_button_icon").height width: height onClicked: From 0904324dde1a64d18839aba86b9ad77c8c79c2b5 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 10:02:09 +0200 Subject: [PATCH 17/40] Use medium_button instead of toolbar_button Since it is less specific and can be used in other places too. CURA-8202 --- .../PrintSetupSelector/PrintSetupSelectorHeader.qml | 6 +++--- .../Recommended/RecommendedAdhesionSelector.qml | 2 +- .../Recommended/RecommendedInfillDensitySelector.qml | 2 +- .../Recommended/RecommendedQualityProfileSelector.qml | 2 +- .../Recommended/RecommendedSupportSelector.qml | 2 +- resources/themes/cura-light/styles.qml | 10 +++++----- resources/themes/cura-light/theme.json | 3 --- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml index 6dd909105d..3b6fc37eb4 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml @@ -54,7 +54,7 @@ RowLayout source: UM.Theme.getIcon("Infill1") text: Cura.MachineManager.activeStack ? parseInt(infillDensity.properties.value) + "%" : "0%" font: UM.Theme.getFont("medium") - iconSize: UM.Theme.getSize("toolbar_button_icon").width + iconSize: UM.Theme.getSize("medium_button_icon").width UM.SettingPropertyProvider { @@ -70,7 +70,7 @@ RowLayout source: UM.Theme.getIcon("Support") text: supportEnabled.properties.value == "True" ? enabledText : disabledText font: UM.Theme.getFont("medium") - iconSize: UM.Theme.getSize("toolbar_button_icon").width + iconSize: UM.Theme.getSize("medium_button_icon").width UM.SettingPropertyProvider { @@ -86,7 +86,7 @@ RowLayout source: UM.Theme.getIcon("Adhesion") text: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" ? enabledText : disabledText font: UM.Theme.getFont("medium") - iconSize: UM.Theme.getSize("toolbar_button_icon").width + iconSize: UM.Theme.getSize("medium_button_icon").width UM.SettingPropertyProvider { diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml index 40d1e890dc..a3a5047ee9 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml @@ -29,7 +29,7 @@ Item text: catalog.i18nc("@label", "Adhesion") font: UM.Theme.getFont("medium") width: labelColumnWidth - iconSize: UM.Theme.getSize("toolbar_button_icon").width + iconSize: UM.Theme.getSize("medium_button_icon").width } Item diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index d78c63c803..0f2e6bc706 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -65,7 +65,7 @@ Item text: catalog.i18nc("@label", "Infill") + " (%)" font: UM.Theme.getFont("medium") width: labelColumnWidth - iconSize: UM.Theme.getSize("toolbar_button_icon").width + iconSize: UM.Theme.getSize("medium_button_icon").width } Item diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 3c54c37785..fbc958c51c 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -52,7 +52,7 @@ Item text: catalog.i18nc("@label", "Profiles") font: UM.Theme.getFont("medium") width: labelColumnWidth - iconSize: UM.Theme.getSize("toolbar_button_icon").width + iconSize: UM.Theme.getSize("medium_button_icon").width } UM.SimpleButton { diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 50327d364b..5fb437b1c2 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -30,7 +30,7 @@ Item text: catalog.i18nc("@label", "Support") font: UM.Theme.getFont("medium") width: labelColumnWidth - iconSize: UM.Theme.getSize("toolbar_button_icon").width + iconSize: UM.Theme.getSize("medium_button_icon").width } Item diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 62c673c584..1320b54f37 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -175,8 +175,8 @@ QtObject { background: Item { - implicitWidth: UM.Theme.getSize("toolbar_button").width - implicitHeight: UM.Theme.getSize("toolbar_button").height + implicitWidth: UM.Theme.getSize("button").width + implicitHeight: UM.Theme.getSize("button").height UM.PointingRectangle { @@ -252,11 +252,11 @@ QtObject anchors.centerIn: parent opacity: control.enabled ? 1.0 : 0.2 source: control.iconSource - width: UM.Theme.getSize("toolbar_button_icon").width - height: UM.Theme.getSize("toolbar_button_icon").height + width: UM.Theme.getSize("medium_button_icon").width + height: UM.Theme.getSize("medium_button_icon").height color: UM.Theme.getColor("icon") - sourceSize: UM.Theme.getSize("toolbar_button_icon") + sourceSize: UM.Theme.getSize("medium_button_icon") } } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 984681b8da..c45eb00c9e 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -527,9 +527,6 @@ "button_icon": [2.5, 2.5], "button_lining": [0, 0], - "toolbar_button": [4, 4], - "toolbar_button_icon": [2, 2], - "action_button": [15.0, 2.5], "action_button_icon": [1.0, 1.0], "action_button_radius": [0.15, 0.15], From 0d64f3383a817f1fb4f1256db9c46d4eaec088d5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 1 Jul 2021 10:08:53 +0200 Subject: [PATCH 18/40] Remove silly id from extruderIcon Whoops. That was a debug thingie. CURA-8011 --- resources/qml/ExtruderIcon.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index 2d21ed9e13..a4118228db 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -24,7 +24,6 @@ Item UM.RecolorImage { - id: blorp anchors.fill: parent source: UM.Theme.getIcon("ExtruderColor", "medium") From 196e5ba3978b2444fea5e94b68d872495774d68d Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 11:21:45 +0200 Subject: [PATCH 19/40] Increase size of buildplate icon in monitor page CURA-8202 --- .../resources/qml/MonitorBuildplateConfiguration.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml index f3002fd25b..0f4aec5424 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml @@ -50,7 +50,7 @@ Item id: buildplateIcon anchors.centerIn: parent color: UM.Theme.getColor("monitor_icon_primary") - height: parent.height + height: UM.Theme.getSize("medium_button_icon").width source: "../svg/icons/Buildplate.svg" width: height visible: buildplate From 1f612f3e1a0a038b109e77a0e650bbde81d68a60 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 11:37:03 +0200 Subject: [PATCH 20/40] Align extruder labels in monitor page with the extruder icon CURA-8202 --- .../qml/MonitorExtruderConfiguration.qml | 28 ++++--------------- .../resources/qml/MonitorIconExtruder.qml | 3 +- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml index ac5f588db3..c305c76ac6 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml @@ -37,6 +37,7 @@ Item { id: extruderIcon color: UM.Theme.getColor("monitor_skeleton_loading") + size: UM.Theme.getSize("button_icon").width position: 0 } @@ -46,16 +47,18 @@ Item anchors { left: extruderIcon.right - leftMargin: 12 * screenScaleFactor // TODO: Theme! + leftMargin: UM.Theme.getSize("default_margin").width + verticalCenter: extruderIcon.verticalCenter } color: materialLabel.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading") - height: 18 * screenScaleFactor // TODO: Theme! + height: childrenRect.height width: Math.max(materialLabel.contentWidth, 60 * screenScaleFactor) // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme! Label { id: materialLabel + anchors.top: parent.top color: UM.Theme.getColor("text") elide: Text.ElideRight @@ -63,29 +66,13 @@ Item text: "" visible: text !== "" - // FIXED-LINE-HEIGHT: - height: parent.height - verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering } - } - - Rectangle - { - id: printCoreLabelWrapper - anchors - { - left: materialLabelWrapper.left - bottom: parent.bottom - } - color: printCoreLabel.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading") - height: 18 * screenScaleFactor // TODO: Theme! - width: Math.max(printCoreLabel.contentWidth, 36 * screenScaleFactor) // TODO: Theme! - radius: 2 * screenScaleFactor // TODO: Theme! Label { id: printCoreLabel + anchors.top: materialLabel.bottom color: UM.Theme.getColor("text") elide: Text.ElideRight @@ -93,9 +80,6 @@ Item text: "" visible: text !== "" - // FIXED-LINE-HEIGHT: - height: parent.height - verticalAlignment: Text.AlignVCenter renderType: Text.NativeRendering } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml index 79bc0ec25b..ad0e8a6777 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml @@ -38,6 +38,7 @@ Item Label { id: positionLabel + anchors.centerIn: icon font: UM.Theme.getFont("small") color: UM.Theme.getColor("text") height: Math.round(size / 2) @@ -45,8 +46,6 @@ Item text: position + 1 verticalAlignment: Text.AlignVCenter width: Math.round(size / 2) - x: Math.round(size * 0.25) - y: Math.round(size * 0.15625) visible: position >= 0 renderType: Text.NativeRendering } From 0472df38149a40ca0af28b9a66457f7d819a39fb Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 11:42:31 +0200 Subject: [PATCH 21/40] Change collapse button icon in expandable component to chevron CURA-8202 --- resources/qml/ExpandableComponent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index f58d7b59ff..f48cc685db 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -167,7 +167,7 @@ Item verticalCenter: parent.verticalCenter margins: background.padding } - source: UM.Theme.getIcon("Pen") + source: expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft") visible: source != "" width: UM.Theme.getSize("standard_arrow").width height: UM.Theme.getSize("standard_arrow").height From bf40ccc3f2005bd3132b9b10b72f0bcbef2e31e4 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 11:55:24 +0200 Subject: [PATCH 22/40] Replace shadow with border in headerbar in simulation view CURA-8202 --- plugins/PreviewStage/PreviewMenu.qml | 25 +++++-------------- .../SimulationViewMenuComponent.qml | 3 +++ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/plugins/PreviewStage/PreviewMenu.qml b/plugins/PreviewStage/PreviewMenu.qml index ff1ccff75f..2c9d1d5319 100644 --- a/plugins/PreviewStage/PreviewMenu.qml +++ b/plugins/PreviewStage/PreviewMenu.qml @@ -35,26 +35,21 @@ Item anchors.horizontalCenter: parent.horizontalCenter width: parent.width - 2 * UM.Theme.getSize("wide_margin").width height: parent.height + // This is a trick to make sure that the borders of the two adjacent buttons' borders overlap. Otherwise + // there will be double border (one from each button) + spacing: -UM.Theme.getSize("default_lining").width Cura.ViewsSelector { id: viewsSelector height: parent.height width: UM.Theme.getSize("views_selector").width + headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width + headerBackgroundBorder.color: UM.Theme.getColor("lining") + enableHeaderShadow: false headerCornerSide: Cura.RoundedRectangle.Direction.Left } - // Separator line - Rectangle - { - height: parent.height - // If there is no viewPanel, we only need a single spacer, so hide this one. - visible: viewPanel.source != "" - width: visible ? UM.Theme.getSize("default_lining").width : 0 - - color: UM.Theme.getColor("lining") - } - // This component will grow freely up to complete the width of the row. Loader { @@ -64,14 +59,6 @@ Item source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : "" } - // Separator line - Rectangle - { - height: parent.height - width: UM.Theme.getSize("default_lining").width - color: UM.Theme.getColor("lining") - } - Item { id: printSetupSelectorItem diff --git a/plugins/SimulationView/SimulationViewMenuComponent.qml b/plugins/SimulationView/SimulationViewMenuComponent.qml index 86e686e0fc..ba1b546043 100644 --- a/plugins/SimulationView/SimulationViewMenuComponent.qml +++ b/plugins/SimulationView/SimulationViewMenuComponent.qml @@ -16,6 +16,9 @@ Cura.ExpandableComponent id: base dragPreferencesNamePrefix: "view/colorscheme" + headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width + headerBackgroundBorder.color: UM.Theme.getColor("lining") + enableHeaderShadow: false contentHeaderTitle: catalog.i18nc("@label", "Color scheme") From ce88392137128fd7095a4b516a3584b592a0e4e4 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 11:57:14 +0200 Subject: [PATCH 23/40] Replace shadow with border in machine selector in monitor page CURA-8202 --- plugins/MonitorStage/MonitorMenu.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/MonitorStage/MonitorMenu.qml b/plugins/MonitorStage/MonitorMenu.qml index bc95c276e8..4c29c84312 100644 --- a/plugins/MonitorStage/MonitorMenu.qml +++ b/plugins/MonitorStage/MonitorMenu.qml @@ -15,6 +15,9 @@ Item Cura.MachineSelector { id: machineSelection + headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width + headerBackgroundBorder.color: UM.Theme.getColor("lining") + enableHeaderShadow: false headerCornerSide: Cura.RoundedRectangle.Direction.All width: UM.Theme.getSize("machine_selector_widget").width height: parent.height From 0505842235a8a6cea0226c00e6753e0297bc1f3a Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 12:07:35 +0200 Subject: [PATCH 24/40] Remove DropShadow from ExpandablePopup and ExpandableComponent Since they are not used anywhere anymore CURA-8202 --- plugins/MonitorStage/MonitorMenu.qml | 1 - plugins/PrepareStage/PrepareMenu.qml | 2 -- plugins/PreviewStage/PreviewMenu.qml | 1 - .../SimulationViewMenuComponent.qml | 1 - resources/qml/ExpandableComponent.qml | 24 ++----------------- resources/qml/ExpandablePopup.qml | 24 ++----------------- .../PrintSetupSelector/PrintSetupSelector.qml | 1 - 7 files changed, 4 insertions(+), 50 deletions(-) diff --git a/plugins/MonitorStage/MonitorMenu.qml b/plugins/MonitorStage/MonitorMenu.qml index 4c29c84312..dc339ed8ef 100644 --- a/plugins/MonitorStage/MonitorMenu.qml +++ b/plugins/MonitorStage/MonitorMenu.qml @@ -17,7 +17,6 @@ Item id: machineSelection headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.color: UM.Theme.getColor("lining") - enableHeaderShadow: false headerCornerSide: Cura.RoundedRectangle.Direction.All width: UM.Theme.getSize("machine_selector_widget").width height: parent.height diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 09bb2a9fc1..012d2b9d36 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -54,7 +54,6 @@ Item headerCornerSide: Cura.RoundedRectangle.Direction.Left headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.color: UM.Theme.getColor("lining") - enableHeaderShadow: false Layout.preferredWidth: parent.machineSelectorWidth Layout.fillWidth: true Layout.fillHeight: true @@ -63,7 +62,6 @@ Item Cura.ConfigurationMenu { id: printerSetup - enableHeaderShadow: false headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.color: UM.Theme.getColor("lining") Layout.fillHeight: true diff --git a/plugins/PreviewStage/PreviewMenu.qml b/plugins/PreviewStage/PreviewMenu.qml index 2c9d1d5319..290a085772 100644 --- a/plugins/PreviewStage/PreviewMenu.qml +++ b/plugins/PreviewStage/PreviewMenu.qml @@ -46,7 +46,6 @@ Item width: UM.Theme.getSize("views_selector").width headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.color: UM.Theme.getColor("lining") - enableHeaderShadow: false headerCornerSide: Cura.RoundedRectangle.Direction.Left } diff --git a/plugins/SimulationView/SimulationViewMenuComponent.qml b/plugins/SimulationView/SimulationViewMenuComponent.qml index ba1b546043..a4126db7ab 100644 --- a/plugins/SimulationView/SimulationViewMenuComponent.qml +++ b/plugins/SimulationView/SimulationViewMenuComponent.qml @@ -18,7 +18,6 @@ Cura.ExpandableComponent dragPreferencesNamePrefix: "view/colorscheme" headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.color: UM.Theme.getColor("lining") - enableHeaderShadow: false contentHeaderTitle: catalog.i18nc("@label", "Color scheme") diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index f48cc685db..e1c4a03807 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -7,8 +7,6 @@ import QtQuick.Controls 2.3 import UM 1.2 as UM import Cura 1.0 as Cura -import QtGraphicalEffects 1.0 // For the dropshadow - // The expandable component has 2 major sub components: // * The headerItem; Always visible and should hold some info about what happens if the component is expanded // * The contentItem; The content that needs to be shown if the component is expanded. @@ -75,11 +73,7 @@ Item // On what side should the header corners be shown? 1 is down, 2 is left, 3 is up and 4 is right. property alias headerCornerSide: background.cornerSide - property alias headerShadowColor: shadow.color - - property alias enableHeaderShadow: shadow.visible - - property int shadowOffset: 2 + property int popupOffset: 2 // Prefix used for the dragged position preferences. Preferences not used if empty. Don't translate! property string dragPreferencesNamePrefix: "" @@ -186,20 +180,6 @@ Item } } - DropShadow - { - id: shadow - // Don't blur the shadow - radius: 0 - anchors.fill: background - source: background - verticalOffset: base.shadowOffset - visible: true - color: UM.Theme.getColor("action_button_shadow") - // Should always be drawn behind the background. - z: background.z - 1 - } - Cura.RoundedRectangle { id: contentContainer @@ -211,7 +191,7 @@ Item height: childrenRect.height // Ensure that the content is located directly below the headerItem - y: dragPreferencesNamePrefix === "" ? (background.height + base.shadowOffset + base.contentSpacingY) : UM.Preferences.getValue(dragPreferencesNamePrefix + dragPreferencesNameY) + y: dragPreferencesNamePrefix === "" ? (background.height + base.popupOffset + base.contentSpacingY) : UM.Preferences.getValue(dragPreferencesNamePrefix + dragPreferencesNameY) // Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left. // In case of right alignment, the 3x padding is due to left, right and padding between the button & text. diff --git a/resources/qml/ExpandablePopup.qml b/resources/qml/ExpandablePopup.qml index 69f7f61433..f47d6239dc 100644 --- a/resources/qml/ExpandablePopup.qml +++ b/resources/qml/ExpandablePopup.qml @@ -7,8 +7,6 @@ import QtQuick.Controls 2.3 import UM 1.2 as UM import Cura 1.0 as Cura -import QtGraphicalEffects 1.0 // For the dropshadow - // The expandable component has 2 major sub components: // * The headerItem; Always visible and should hold some info about what happens if the component is expanded // * The contentItem; The content that needs to be shown if the component is expanded. @@ -74,11 +72,7 @@ Item // Change the contentItem close behaviour property alias contentClosePolicy : content.closePolicy - property alias headerShadowColor: shadow.color - - property alias enableHeaderShadow: shadow.visible - - property int shadowOffset: 2 + property int popupOffset: 2 onEnabledChanged: { @@ -190,26 +184,12 @@ Item } - DropShadow - { - id: shadow - // Don't blur the shadow - radius: 0 - anchors.fill: background - source: background - verticalOffset: base.shadowOffset - visible: true - color: UM.Theme.getColor("action_button_shadow") - // Should always be drawn behind the background. - z: background.z - 1 - } - Popup { id: content // Ensure that the content is located directly below the headerItem - y: background.height + base.shadowOffset + y: background.height + base.popupOffset // Make the content aligned with the rest, using the property contentAlignment to decide whether is right or left. // In case of right alignment, the 3x padding is due to left, right and padding between the button & text. diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml index a378290b03..3bb31fecc1 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml @@ -17,7 +17,6 @@ Cura.ExpandableComponent contentPadding: UM.Theme.getSize("default_lining").width contentHeaderTitle: catalog.i18nc("@label", "Print settings") - enableHeaderShadow: false headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width headerBackgroundBorder.color: UM.Theme.getColor("lining") enabled: !preSlicedData From a7446d681f443a8430e100b51eb693ff533b63ea Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 14:20:57 +0200 Subject: [PATCH 25/40] Set header border and color by default in ExpandablePopup and Component CURA-8202 --- plugins/MonitorStage/MonitorMenu.qml | 2 -- plugins/PrepareStage/PrepareMenu.qml | 4 ---- plugins/PreviewStage/PreviewMenu.qml | 2 -- plugins/SimulationView/SimulationViewMenuComponent.qml | 2 -- resources/qml/ExpandableComponent.qml | 6 ++++++ resources/qml/ExpandablePopup.qml | 6 ++++++ resources/qml/PrintSetupSelector/PrintSetupSelector.qml | 2 -- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/MonitorStage/MonitorMenu.qml b/plugins/MonitorStage/MonitorMenu.qml index dc339ed8ef..bc95c276e8 100644 --- a/plugins/MonitorStage/MonitorMenu.qml +++ b/plugins/MonitorStage/MonitorMenu.qml @@ -15,8 +15,6 @@ Item Cura.MachineSelector { id: machineSelection - headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width - headerBackgroundBorder.color: UM.Theme.getColor("lining") headerCornerSide: Cura.RoundedRectangle.Direction.All width: UM.Theme.getSize("machine_selector_widget").width height: parent.height diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index 012d2b9d36..82f61da069 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -52,8 +52,6 @@ Item { id: machineSelection headerCornerSide: Cura.RoundedRectangle.Direction.Left - headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width - headerBackgroundBorder.color: UM.Theme.getColor("lining") Layout.preferredWidth: parent.machineSelectorWidth Layout.fillWidth: true Layout.fillHeight: true @@ -62,8 +60,6 @@ Item Cura.ConfigurationMenu { id: printerSetup - headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width - headerBackgroundBorder.color: UM.Theme.getColor("lining") Layout.fillHeight: true Layout.fillWidth: true Layout.preferredWidth: parent.machineSelectorWidth * 2 diff --git a/plugins/PreviewStage/PreviewMenu.qml b/plugins/PreviewStage/PreviewMenu.qml index 290a085772..e6c4a25c4c 100644 --- a/plugins/PreviewStage/PreviewMenu.qml +++ b/plugins/PreviewStage/PreviewMenu.qml @@ -44,8 +44,6 @@ Item id: viewsSelector height: parent.height width: UM.Theme.getSize("views_selector").width - headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width - headerBackgroundBorder.color: UM.Theme.getColor("lining") headerCornerSide: Cura.RoundedRectangle.Direction.Left } diff --git a/plugins/SimulationView/SimulationViewMenuComponent.qml b/plugins/SimulationView/SimulationViewMenuComponent.qml index a4126db7ab..86e686e0fc 100644 --- a/plugins/SimulationView/SimulationViewMenuComponent.qml +++ b/plugins/SimulationView/SimulationViewMenuComponent.qml @@ -16,8 +16,6 @@ Cura.ExpandableComponent id: base dragPreferencesNamePrefix: "view/colorscheme" - headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width - headerBackgroundBorder.color: UM.Theme.getColor("lining") contentHeaderTitle: catalog.i18nc("@label", "Color scheme") diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index e1c4a03807..415d994ceb 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -56,6 +56,9 @@ Item property alias headerBackgroundBorder: background.border + // Whether or not to show the background border + property bool enableHeaderBackgroundBorder: true + // What icon should be displayed on the right. property alias iconSource: collapseButton.source @@ -116,6 +119,9 @@ Item id: background property real padding: UM.Theme.getSize("default_margin").width + border.width: base.enableHeaderBackgroundBorder ? UM.Theme.getSize("default_lining").width : 0 + border.color: UM.Theme.getColor("lining") + color: base.enabled ? (base.expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled") anchors.fill: parent diff --git a/resources/qml/ExpandablePopup.qml b/resources/qml/ExpandablePopup.qml index f47d6239dc..da56470bfb 100644 --- a/resources/qml/ExpandablePopup.qml +++ b/resources/qml/ExpandablePopup.qml @@ -50,6 +50,9 @@ Item property alias headerBackgroundBorder: background.border + // Whether or not to show the background border + property bool enableHeaderBackgroundBorder: true + // What icon should be displayed on the right. property alias iconSource: collapseButton.source @@ -110,6 +113,9 @@ Item id: background property real padding: UM.Theme.getSize("default_margin").width + border.width: base.enableHeaderBackgroundBorder ? UM.Theme.getSize("default_lining").width : 0 + border.color: UM.Theme.getColor("lining") + color: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled") anchors.fill: parent diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml index 3bb31fecc1..414c349bb6 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml @@ -17,8 +17,6 @@ Cura.ExpandableComponent contentPadding: UM.Theme.getSize("default_lining").width contentHeaderTitle: catalog.i18nc("@label", "Print settings") - headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width - headerBackgroundBorder.color: UM.Theme.getColor("lining") enabled: !preSlicedData disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G-code file can not be modified.") From b34dd6117217b0beed35902df40b656eda6b4aab Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Thu, 1 Jul 2021 16:08:53 +0200 Subject: [PATCH 26/40] Align layer height labels with the "Profiles" label CURA-8202 --- .../Recommended/RecommendedQualityProfileSelector.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index fbc958c51c..0823b5cb62 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -92,6 +92,7 @@ Item { left: profileLabel.right right: parent.right + verticalCenter: profileLabel.verticalCenter } model: Cura.QualityProfilesDropDownMenuModel From 1e0efccd0b03c0dde9bbdcb785d610d032a7c260 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 2 Jul 2021 09:38:12 +0200 Subject: [PATCH 27/40] Remove the margin from the ViewOrientation buttons CURA-8202 --- resources/qml/ViewOrientationButton.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/ViewOrientationButton.qml b/resources/qml/ViewOrientationButton.qml index 5d72de9a8d..7040447b29 100644 --- a/resources/qml/ViewOrientationButton.qml +++ b/resources/qml/ViewOrientationButton.qml @@ -11,5 +11,4 @@ UM.SimpleButton height: UM.Theme.getSize("small_button").height hoverColor: UM.Theme.getColor("small_button_text_hover") color: UM.Theme.getColor("small_button_text") - iconMargin: UM.Theme.getSize("thick_lining").width } \ No newline at end of file From b1ff639fc4a21bcb5bb9e3be11b074c2d6c3e00a Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 2 Jul 2021 09:38:42 +0200 Subject: [PATCH 28/40] Add border around the checked radio button in the intents and infill CURA-8202 --- .../Recommended/RecommendedInfillDensitySelector.qml | 2 ++ resources/qml/RadioCheckbar.qml | 1 + 2 files changed, 3 insertions(+) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index 0f2e6bc706..e79e074883 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -120,6 +120,8 @@ Item implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width implicitHeight: implicitWidth radius: Math.round(implicitWidth / 2) + border.color: defaultItemColor + border.width: UM.Theme.getSize("default_lining").height } tickmarks: Repeater diff --git a/resources/qml/RadioCheckbar.qml b/resources/qml/RadioCheckbar.qml index 0b8709fe7a..5aea771a44 100644 --- a/resources/qml/RadioCheckbar.qml +++ b/resources/qml/RadioCheckbar.qml @@ -146,6 +146,7 @@ Item } radius: Math.round(width / 2) color: activeColor + border.color: defaultItemColor visible: checkbox.checked } } From e249db4477e268db96159fa09224de5c2c8ba17a Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 2 Jul 2021 12:11:04 +0200 Subject: [PATCH 29/40] Fix ExtruderColor and Extruder icons bleeding into each other CURA-8011 --- resources/qml/ExtruderButton.qml | 1 + resources/qml/ExtruderIcon.qml | 10 +++++-- .../cura-light/icons/default/Extruder.svg | 13 ++++++++ .../icons/default/ExtruderColor.svg | 14 +++++++++ .../cura-light/icons/medium/ExtruderColor.svg | 13 ++++---- resources/themes/cura-light/theme.json | 30 +++++++++++++++---- 6 files changed, 68 insertions(+), 13 deletions(-) create mode 100644 resources/themes/cura-light/icons/default/Extruder.svg create mode 100644 resources/themes/cura-light/icons/default/ExtruderColor.svg diff --git a/resources/qml/ExtruderButton.qml b/resources/qml/ExtruderButton.qml index feb399d528..b87855e25e 100644 --- a/resources/qml/ExtruderButton.qml +++ b/resources/qml/ExtruderButton.qml @@ -22,6 +22,7 @@ Cura.ToolbarButton { materialColor: extruder.color extruderEnabled: extruder.stack.isEnabled + iconVariant: "default" property int index: extruder.index } diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index a4118228db..4cc9ffe69b 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -16,6 +16,8 @@ Item property color materialColor property alias textColor: extruderNumberText.color property bool extruderEnabled: true + property alias iconSize: mainIcon.sourceSize + property string iconVariant: "medium" Item { @@ -25,16 +27,18 @@ Item UM.RecolorImage { anchors.fill: parent + sourceSize: mainIcon.sourceSize - source: UM.Theme.getIcon("ExtruderColor", "medium") + source: UM.Theme.getIcon("ExtruderColor", iconVariant) color: materialColor } UM.RecolorImage { id: mainIcon anchors.fill: parent + sourceSize: UM.Theme.getSize("extruder_icon") - source: UM.Theme.getIcon("Extruder", "medium") + source: UM.Theme.getIcon("Extruder", iconVariant) color: UM.Theme.getColor("text") } @@ -43,7 +47,7 @@ Item id: extruderNumberText anchors.centerIn: parent text: index + 1 - font: UM.Theme.getFont("small") + font: UM.Theme.getFont("small_black") color: UM.Theme.getColor("text") width: contentWidth height: contentHeight diff --git a/resources/themes/cura-light/icons/default/Extruder.svg b/resources/themes/cura-light/icons/default/Extruder.svg new file mode 100644 index 0000000000..7c17fa67ca --- /dev/null +++ b/resources/themes/cura-light/icons/default/Extruder.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/resources/themes/cura-light/icons/default/ExtruderColor.svg b/resources/themes/cura-light/icons/default/ExtruderColor.svg new file mode 100644 index 0000000000..ff202e7296 --- /dev/null +++ b/resources/themes/cura-light/icons/default/ExtruderColor.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/themes/cura-light/icons/medium/ExtruderColor.svg b/resources/themes/cura-light/icons/medium/ExtruderColor.svg index c017c69106..85360a9622 100644 --- a/resources/themes/cura-light/icons/medium/ExtruderColor.svg +++ b/resources/themes/cura-light/icons/medium/ExtruderColor.svg @@ -1,10 +1,13 @@ - + - - - + + + diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index c45eb00c9e..43151e746d 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -129,24 +129,44 @@ "family": "Noto Sans" }, "small": { - "size": 0.7, + "size": 0.9, "weight": 40, "family": "Noto Sans" }, "small_ja_JP": { - "size": 0.7, + "size": 0.9, "weight": 50, "family": "Noto Sans" }, "small_zh_CN": { - "size": 0.7, + "size": 0.9, "weight": 50, "family": "Noto Sans" }, "small_zh_TW": { - "size": 0.7, + "size": 0.9, "weight": 50, "family": "Noto Sans" + }, + "small_black": { + "size": 0.9, + "weight": 100, + "family": "Noto Sans" + }, + "small_black_ja_JP": { + "size": 0.9, + "weight": 100, + "family": "Noto Sans" + }, + "small_black_zh_CN": { + "size": 0.9, + "weight": 100, + "family": "Noto Sans" + }, + "small_black_zh_TW": { + "size": 0.9, + "weight": 100, + "family": "Noto Sans" } }, @@ -503,7 +523,7 @@ "thin_margin": [0.71, 0.71], "narrow_margin": [0.5, 0.5], - "extruder_icon": [2.33, 2.33], + "extruder_icon": [2.5, 2.5], "section": [0.0, 2], "section_control": [0, 1], From cc305100581f1ec31282351e69b16ba22e352f60 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 2 Jul 2021 12:12:18 +0200 Subject: [PATCH 30/40] Let ExtruderIcon decide its size in the ConfigurationMenu CURA-8011 --- resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index f55bb0e37c..2c399ab548 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -56,7 +56,6 @@ Cura.ExpandablePopup id: extruderIcon materialColor: model.color extruderEnabled: model.enabled - width: UM.Theme.getSize("button_icon").width anchors.verticalCenter: parent.verticalCenter } From 7f6e6403d2ee2c17d4485b24c6e302f2e9830791 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 2 Jul 2021 12:13:28 +0200 Subject: [PATCH 31/40] Set the "Not overridden" extruder color as transparetn Otherwise a white extruder is drawn in the dark theme next to the "Not overridden" label. CURA-8011 --- cura/Machines/Models/ExtrudersModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/ExtrudersModel.py b/cura/Machines/Models/ExtrudersModel.py index e979a1e848..1aba1d871a 100644 --- a/cura/Machines/Models/ExtrudersModel.py +++ b/cura/Machines/Models/ExtrudersModel.py @@ -215,7 +215,7 @@ class ExtrudersModel(ListModel): "id": "", "name": catalog.i18nc("@menuitem", "Not overridden"), "enabled": True, - "color": "#ffffff", + "color": "transparent", "index": -1, "definition": "", "material": "", From b378e4870a0ca67a8ee98a8ec28387129055b588 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 2 Jul 2021 12:14:10 +0200 Subject: [PATCH 32/40] Change the extruder icon in the object list to be a filled circle CURA-8011 --- resources/qml/ObjectItemButton.qml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/resources/qml/ObjectItemButton.qml b/resources/qml/ObjectItemButton.qml index 7d8988fde4..1637b8d0cd 100644 --- a/resources/qml/ObjectItemButton.qml +++ b/resources/qml/ObjectItemButton.qml @@ -13,8 +13,6 @@ Button width: parent.width height: UM.Theme.getSize("action_button").height - leftPadding: UM.Theme.getSize("thin_margin").width - rightPadding: perObjectSettingsInfo.visible ? UM.Theme.getSize("default_lining").width : UM.Theme.getSize("thin_margin").width checkable: true hoverEnabled: true @@ -46,14 +44,14 @@ Button width: objectItemButton.width - objectItemButton.leftPadding height: UM.Theme.getSize("action_button").height - UM.RecolorImage + Rectangle { id: swatch anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left - width: height - height: parent.height - UM.Theme.getSize("narrow_margin").height - source: UM.Theme.getIcon("Extruder", "medium") + width: UM.Theme.getSize("standard_arrow").height + height: UM.Theme.getSize("standard_arrow").height + radius: Math.round(width / 2) color: extruderColor visible: showExtruderSwatches && extruderColor != "" } From a6cd2fe970e33747db887a08f0e4072a205d444a Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Fri, 2 Jul 2021 12:15:26 +0200 Subject: [PATCH 33/40] Change the extruder icon in the settings dropdown to be a filled circle This makes it much more distinguishable. CURA-8011 --- .../Recommended/RecommendedSupportSelector.qml | 12 ++++-------- resources/qml/Settings/SettingExtruder.qml | 16 ++++++---------- .../qml/Settings/SettingOptionalExtruder.qml | 16 ++++++---------- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 5fb437b1c2..4e2341fb57 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -219,18 +219,16 @@ Item elide: Text.ElideLeft verticalAlignment: Text.AlignVCenter - background: UM.RecolorImage + background: Rectangle { id: swatch height: Math.round(parent.height / 2) width: height + radius: Math.round(width / 2) anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: UM.Theme.getSize("thin_margin").width - sourceSize.width: width - sourceSize.height: height - source: UM.Theme.getIcon("Extruder", "medium") color: supportExtruderCombobox.color } } @@ -289,18 +287,16 @@ Item verticalAlignment: Text.AlignVCenter rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width - background: UM.RecolorImage + background: Rectangle { id: swatch height: Math.round(parent.height / 2) width: height + radius: Math.round(width / 2) anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: UM.Theme.getSize("thin_margin").width - sourceSize.width: width - sourceSize.height: height - source: UM.Theme.getIcon("Extruder", "medium") color: supportExtruderCombobox.model.getItem(index).color } } diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index 995e1103f3..ea514eb069 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -77,7 +77,7 @@ SettingItem currentIndex: propertyProvider.properties.value !== undefined ? propertyProvider.properties.value : 0 - property string color: "#fff" + property string color: "transparent" Binding { @@ -85,7 +85,7 @@ SettingItem // explicit binding here otherwise we do not handle value changes after the model changes. target: control property: "color" - value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "" + value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "transparent" } Binding @@ -160,18 +160,16 @@ SettingItem elide: Text.ElideLeft verticalAlignment: Text.AlignVCenter - background: UM.RecolorImage + background: Rectangle { id: swatch height: Math.round(parent.height / 2) width: height + radius: Math.round(width / 2) anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: UM.Theme.getSize("thin_margin").width - sourceSize.width: width - sourceSize.height: height - source: UM.Theme.getIcon("Extruder", "medium") color: control.color } } @@ -229,18 +227,16 @@ SettingItem verticalAlignment: Text.AlignVCenter rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width - background: UM.RecolorImage + background: Rectangle { id: swatch height: Math.round(parent.height / 2) width: height + radius: Math.round(width / 2) anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: UM.Theme.getSize("thin_margin").width - sourceSize.width: width - sourceSize.height: height - source: UM.Theme.getIcon("Extruder", "medium") color: control.model.getItem(index).color } } diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 5b1da6b785..94df1bcc03 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -88,7 +88,7 @@ SettingItem when: control.model.items.length > 0 } - property string color: "#fff" + property string color: "transparent" Binding { @@ -96,7 +96,7 @@ SettingItem // explicit binding here otherwise we do not handle value changes after the model changes. target: control property: "color" - value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "" + value: control.currentText != "" ? control.model.getItem(control.currentIndex).color : "transparent" } indicator: UM.RecolorImage @@ -161,18 +161,16 @@ SettingItem elide: Text.ElideRight verticalAlignment: Text.AlignVCenter - background: UM.RecolorImage + background: Rectangle { id: swatch height: Math.round(parent.height / 2) width: height + radius: Math.round(width / 2) anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: UM.Theme.getSize("thin_margin").width - sourceSize.width: width - sourceSize.height: height - source: UM.Theme.getIcon("Extruder", "medium") color: control.color } } @@ -226,18 +224,16 @@ SettingItem verticalAlignment: Text.AlignVCenter rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width - background: UM.RecolorImage + background: Rectangle { id: swatch height: Math.round(parent.height / 2) width: height + radius: Math.round(width / 2) anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.rightMargin: UM.Theme.getSize("thin_margin").width - sourceSize.width: width - sourceSize.height: height - source: UM.Theme.getIcon("Extruder", "medium") color: control.model.getItem(index).color } } From 97bb25aef0f61620348357b73471d2d61f35221a Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 5 Jul 2021 10:06:16 +0200 Subject: [PATCH 34/40] Fix Print settings window getting locked in the y direction Due to a wrong reference, the settings window was getting an incorrect initialY position. This lead to the window being unable to be dragged in the y direction. CURA-8011 --- resources/qml/ExpandableComponent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index 415d994ceb..bbe617e27d 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -216,7 +216,7 @@ Item var maxPt = base.mapFromItem(null, CuraApplication.appWidth() - (contentContainer.width + margin.width), CuraApplication.appHeight() - (contentContainer.height + margin.height)); - var initialY = background.height + base.shadowOffset + margin.height; + var initialY = background.height + base.popupOffset + margin.height; contentContainer.x = Math.max(minPt.x, Math.min(maxPt.x, posNewX)); contentContainer.y = Math.max(initialY, Math.min(maxPt.y, posNewY)); From 9c49baa9ce0957cee7b20c8df96c734763867775 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 5 Jul 2021 10:07:23 +0200 Subject: [PATCH 35/40] Fix incorrect reference of the handleButton border color CURA-8011 --- .../Recommended/RecommendedInfillDensitySelector.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index e79e074883..a29b69c924 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -120,7 +120,7 @@ Item implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width implicitHeight: implicitWidth radius: Math.round(implicitWidth / 2) - border.color: defaultItemColor + border.color: UM.Theme.getColor("slider_groove_fill") border.width: UM.Theme.getSize("default_lining").height } From 1a273714a384d1b4ed02db5cd2bae164e27207bc Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 5 Jul 2021 10:37:19 +0200 Subject: [PATCH 36/40] Make the width of the PreviewMenu headers dynamic CURA-8011 --- plugins/PreviewStage/PreviewMenu.qml | 4 ++-- resources/themes/cura-light/theme.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/PreviewStage/PreviewMenu.qml b/plugins/PreviewStage/PreviewMenu.qml index e6c4a25c4c..c6f9d64756 100644 --- a/plugins/PreviewStage/PreviewMenu.qml +++ b/plugins/PreviewStage/PreviewMenu.qml @@ -43,7 +43,7 @@ Item { id: viewsSelector height: parent.height - width: UM.Theme.getSize("views_selector").width + width: Math.max(Math.round((parent.width - printSetupSelectorItem.width) / 3), UM.Theme.getSize("views_selector").width) headerCornerSide: Cura.RoundedRectangle.Direction.Left } @@ -52,7 +52,7 @@ Item { id: viewPanel height: parent.height - width: source != "" ? (previewMenu.width - viewsSelector.width - printSetupSelectorItem.width - 2 * (UM.Theme.getSize("wide_margin").width + UM.Theme.getSize("default_lining").width)) : 0 + width: source != "" ? (previewMenu.width - viewsSelector.width - printSetupSelectorItem.width) : 0 source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : "" } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 43151e746d..eeaf2423de 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -504,7 +504,7 @@ "machine_selector_widget_content": [25.0, 32.0], "machine_selector_icon": [2.5, 2.5], - "views_selector": [23.0, 4.0], + "views_selector": [16.0, 4.0], "printer_type_label": [3.5, 1.5], From 18377d2726c9b40cdedc89b1a8d9964cfb8f85b7 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 5 Jul 2021 11:31:23 +0200 Subject: [PATCH 37/40] Change extruder icon in monitor tab to be same as preview tab There are still some discrepancies (e.g. when the extruder is empty, the Preview tab just keeps it disabled and mentions "Generic PLA" while the Monitor tab shows it disabled by mentions "Empty" in the material. But we consider this acceptable for the time being, since it has been like that for a long time. CURA-8011 --- .../qml/MonitorExtruderConfiguration.qml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml index c305c76ac6..2720e6896a 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorExtruderConfiguration.qml @@ -5,6 +5,8 @@ import QtQuick 2.2 import QtQuick.Controls 2.0 import UM 1.3 as UM +import Cura 1.6 as Cura + /** * This component comprises a colored extruder icon, the material name, and the * print core name. It is used by the MonitorPrinterConfiguration component with @@ -18,10 +20,10 @@ import UM 1.3 as UM Item { // The material color - property alias color: extruderIcon.color + property alias color: extruderIcon.materialColor - // The extruder position; NOTE: Decent human beings count from 0 - property alias position: extruderIcon.position + // The extruder position + property int position // The material name property alias material: materialLabel.text @@ -32,13 +34,13 @@ Item // Height is 2 x 18px labels, plus 4px spacing between them height: 40 * screenScaleFactor // TODO: Theme! width: childrenRect.width + opacity: material != "" && material != "Empty" && position >= 0 ? 1 : 0.4 - MonitorIconExtruder + Cura.ExtruderIcon { id: extruderIcon - color: UM.Theme.getColor("monitor_skeleton_loading") - size: UM.Theme.getSize("button_icon").width - position: 0 + materialColor: UM.Theme.getColor("monitor_skeleton_loading") + anchors.verticalCenter: parent.verticalCenter } Rectangle From 12b844b357e7daf86078b2c2adfe9e8eea295d34 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 5 Jul 2021 11:38:55 +0200 Subject: [PATCH 38/40] Change extruder icon color to follow the color of the text As per the review suggestion https://github.com/Ultimaker/Cura/pull/10051#discussion_r661493104. CURA-8011 --- resources/qml/ExtruderIcon.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index 4cc9ffe69b..47131ed93a 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -39,7 +39,7 @@ Item sourceSize: UM.Theme.getSize("extruder_icon") source: UM.Theme.getIcon("Extruder", iconVariant) - color: UM.Theme.getColor("text") + color: extruderNumberText.color } Label From 0319fdcc41bb9f45e0dbcbf4c8bc39ad63eb3257 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 5 Jul 2021 12:27:29 +0200 Subject: [PATCH 39/40] Get the opacity of the extruder from the theme CURA-8011 --- resources/qml/ExtruderIcon.qml | 2 +- resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml | 2 +- resources/themes/cura-light/theme.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index 47131ed93a..be67515196 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -21,7 +21,7 @@ Item Item { - opacity: extruderEnabled ? 1 : 0.4 + opacity: extruderEnabled ? 1 : UM.Theme.getColor("extruder_disabled").a anchors.fill: parent UM.RecolorImage diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index 2c399ab548..75bb7d0787 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -62,7 +62,7 @@ Cura.ExpandablePopup Item { height: childrenRect.height - opacity: model.enabled ? 1 : 0.4 + opacity: model.enabled ? 1 : UM.Theme.getColor("extruder_disabled").a anchors { left: extruderIcon.right diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index eeaf2423de..f505a248e4 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -270,6 +270,7 @@ "button_tooltip_text": [192, 193, 194, 255], "extruder_button_material_border": [255, 255, 255, 255], + "extruder_disabled": [255, 255, 255, 102], "rating_star": [90, 90, 90, 255], From e7648b654d822c6255674607bc6375964c5221ab Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 5 Jul 2021 14:11:40 +0200 Subject: [PATCH 40/40] Fix ExtruderIcon size in the printer settings tab CURA-8011 and CURA-8202 --- resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index 92cbd7dd89..120aca9228 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -229,6 +229,9 @@ Item anchors.horizontalCenter: parent.horizontalCenter materialColor: model.color extruderEnabled: model.enabled + iconVariant: "default" + width: UM.Theme.getSize("medium_button_icon").width + height: UM.Theme.getSize("medium_button_icon").height } } onClicked: