From 52ff67c1eb45617cd265e4672be6086b30d359a2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 15 Feb 2022 16:09:18 +0100 Subject: [PATCH 01/79] Use separate context menu size for menus Instead of re-using the setting controls. It's not a setting. Contributes to issue CURA-8688. --- resources/qml/Widgets/Menu.qml | 6 +++--- resources/qml/Widgets/MenuItem.qml | 2 +- resources/themes/cura-light/theme.json | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/qml/Widgets/Menu.qml b/resources/qml/Widgets/Menu.qml index 1a6aeff602..8fa326598a 100644 --- a/resources/qml/Widgets/Menu.qml +++ b/resources/qml/Widgets/Menu.qml @@ -14,12 +14,12 @@ UM.Menu id: menu padding: 0 - implicitWidth: UM.Theme.getSize("setting_control").width + width: UM.Theme.getSize("context_menu").width delegate: Cura.MenuItem {} background: Rectangle { - color: UM.Theme.getColor("setting_control") - border.color: UM.Theme.getColor("setting_control_border") + color: UM.Theme.getColor("main_background") + border.color: UM.Theme.getColor("lining") } } \ No newline at end of file diff --git a/resources/qml/Widgets/MenuItem.qml b/resources/qml/Widgets/MenuItem.qml index 201fd480ce..f58f27fb8f 100644 --- a/resources/qml/Widgets/MenuItem.qml +++ b/resources/qml/Widgets/MenuItem.qml @@ -13,7 +13,7 @@ UM.MenuItem { id: menuItem - implicitHeight: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("narrow_margin").height + height: UM.Theme.getSize("context_menu").height opacity: enabled ? 1.0 : 0.5 arrow: UM.RecolorImage diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index f59231d960..482c02d2f3 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -573,6 +573,8 @@ "medium_button": [2.5, 2.5], "medium_button_icon": [2, 2], + "context_menu": [20, 2], + "favorites_row": [2, 2], "favorites_button": [2, 2], "favorites_button_icon": [1.2, 1.2], From e5523838639249b855ee0862fb67acb729b9c0ae Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 15 Feb 2022 16:19:39 +0100 Subject: [PATCH 02/79] Consistently use Cura.Menu and Cura.MenuItem Some of these were using the built-in Menu and MenuItem, causing the menus to appear in different sizes. Contributes to issue CURA-8688. --- resources/qml/MainWindow/ApplicationMenu.qml | 11 +++-------- resources/qml/Menus/EditMenu.qml | 2 +- resources/qml/Menus/HelpMenu.qml | 2 +- resources/qml/Menus/MaterialMenu.qml | 4 ++-- resources/qml/Menus/PreferencesMenu.qml | 2 +- resources/qml/Menus/PrinterTypeMenu.qml | 2 +- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 707111309c..44094521ce 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -20,13 +20,12 @@ Item { id: applicationMenu width: parent.width - FileMenu {} + height: UM.Theme.getSize("context_menu").height + background: Item {} + FileMenu {} EditMenu {} ViewMenu {} - - background: Rectangle {} - SettingsMenu { //On MacOS, don't translate the "Settings" word. @@ -38,13 +37,9 @@ Item //- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar title: (Qt.platform.os == "osx") ? "&Settings" : catalog.i18nc("@title:menu menubar:toplevel", "&Settings") } - ExtensionMenu { id: extensionMenu } - PreferencesMenu {} - HelpMenu {} - } diff --git a/resources/qml/Menus/EditMenu.qml b/resources/qml/Menus/EditMenu.qml index c2ec9903f2..5bcedea415 100644 --- a/resources/qml/Menus/EditMenu.qml +++ b/resources/qml/Menus/EditMenu.qml @@ -7,7 +7,7 @@ import QtQuick.Controls 2.1 import UM 1.6 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { title: catalog.i18nc("@title:menu menubar:toplevel", "&Edit") diff --git a/resources/qml/Menus/HelpMenu.qml b/resources/qml/Menus/HelpMenu.qml index e8a80eeced..4be25fdffe 100644 --- a/resources/qml/Menus/HelpMenu.qml +++ b/resources/qml/Menus/HelpMenu.qml @@ -8,7 +8,7 @@ import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: helpMenu title: catalog.i18nc("@title:menu menubar:toplevel", "&Help") diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index 0834d7b250..e6d7fbc3e9 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -72,7 +72,7 @@ Cura.Menu Cura.MenuSeparator { visible: favoriteMaterialsModel.items.length > 0} - Menu + Cura.Menu { id: genericMenu title: catalog.i18nc("@label:category menu label", "Generic") @@ -108,7 +108,7 @@ Cura.Menu Instantiator { model: brandMaterials - delegate: Menu + delegate: Cura.Menu { id: brandMaterialsMenu title: materialName diff --git a/resources/qml/Menus/PreferencesMenu.qml b/resources/qml/Menus/PreferencesMenu.qml index fd0b5d82c1..3a6dd4b2ce 100644 --- a/resources/qml/Menus/PreferencesMenu.qml +++ b/resources/qml/Menus/PreferencesMenu.qml @@ -7,7 +7,7 @@ import QtQuick.Controls 2.4 import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: preferencesMenu diff --git a/resources/qml/Menus/PrinterTypeMenu.qml b/resources/qml/Menus/PrinterTypeMenu.qml index c959b97c5b..17986ac1b8 100644 --- a/resources/qml/Menus/PrinterTypeMenu.qml +++ b/resources/qml/Menus/PrinterTypeMenu.qml @@ -7,7 +7,7 @@ import QtQuick.Controls 2.4 import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: menu title: "Printer type" From e990e970be3a2b6c23368ffb706f8b7c7a361d1f Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Thu, 17 Feb 2022 15:42:25 +0100 Subject: [PATCH 03/79] Revert background to Rectangle as it was in previous versions of this file. This gives the bar a white background, instead of a transparent background. CURA-8688 --- resources/qml/MainWindow/ApplicationMenu.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 5bf2d80e83..763f199902 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -21,7 +21,7 @@ Item id: applicationMenu width: parent.width height: UM.Theme.getSize("context_menu").height - background: Item {} + background: Rectangle {} FileMenu {} EditMenu {} From 9b05dbdb8523ba7804937033af133714df6ab535 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 18 Feb 2022 10:29:55 +0100 Subject: [PATCH 04/79] MenuItem height has to be set to 0 when visible: false otherwise there is white space in place of the MenuItem. This functionality is included in UM and was being overwritten in Cura.MenuItem. CURA-8688 --- resources/qml/Widgets/MenuItem.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/qml/Widgets/MenuItem.qml b/resources/qml/Widgets/MenuItem.qml index 294aa8e288..059a30e79c 100644 --- a/resources/qml/Widgets/MenuItem.qml +++ b/resources/qml/Widgets/MenuItem.qml @@ -12,8 +12,6 @@ import UM 1.5 as UM UM.MenuItem { id: menuItem - - height: UM.Theme.getSize("context_menu").height opacity: enabled ? 1.0 : 0.5 arrow: UM.RecolorImage From 67c80e8a37b61bee2998862f9d6237fd8bf03c8a Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 18 Feb 2022 14:02:09 +0100 Subject: [PATCH 05/79] Update image loader dialog - Changed the slider to a Cura.Spinbox - Use Cura-styled buttons CURA-8688 --- plugins/ImageReader/ConfigUI.qml | 75 +++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/plugins/ImageReader/ConfigUI.qml b/plugins/ImageReader/ConfigUI.qml index 4b3035f271..ff79e4e31d 100644 --- a/plugins/ImageReader/ConfigUI.qml +++ b/plugins/ImageReader/ConfigUI.qml @@ -11,26 +11,25 @@ import Cura 1.0 as Cura UM.Dialog { - title: catalog.i18nc("@title:window", "Convert Image...") + title: catalog.i18nc("@title:window", "Convert Image") minimumWidth: grid.width + 2 * UM.Theme.getSize("default_margin").height minimumHeight: UM.Theme.getSize("modal_window_minimum").height width: minimumWidth height: minimumHeight - - GridLayout { UM.I18nCatalog { id: catalog; name: "cura" } id: grid - columnSpacing: UM.Theme.getSize("default_margin").width - rowSpacing: UM.Theme.getSize("thin_margin").height + columnSpacing: UM.Theme.getSize("narrow_margin").width + rowSpacing: UM.Theme.getSize("narrow_margin").height columns: 2 UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: catalog.i18nc("@action:label", "Height (mm)") Layout.alignment: Qt.AlignVCenter @@ -45,6 +44,7 @@ UM.Dialog { id: peak_height Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width selectByMouse: true objectName: "Peak_Height" validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ } @@ -62,6 +62,7 @@ UM.Dialog UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: catalog.i18nc("@action:label", "Base (mm)") Layout.alignment: Qt.AlignVCenter @@ -78,6 +79,7 @@ UM.Dialog id: base_height selectByMouse: true Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width objectName: "Base_Height" validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ } onTextChanged: manager.onBaseHeightChanged(text) @@ -94,6 +96,7 @@ UM.Dialog UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: catalog.i18nc("@action:label", "Width (mm)") Layout.alignment: Qt.AlignVCenter @@ -110,6 +113,7 @@ UM.Dialog selectByMouse: true objectName: "Width" Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width focus: true validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ } onTextChanged: manager.onWidthChanged(text) @@ -126,6 +130,7 @@ UM.Dialog UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: catalog.i18nc("@action:label", "Depth (mm)") Layout.alignment: Qt.AlignVCenter @@ -140,6 +145,7 @@ UM.Dialog { id: depth Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width selectByMouse: true objectName: "Depth" focus: true @@ -158,6 +164,7 @@ UM.Dialog UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: "" Layout.alignment: Qt.AlignVCenter @@ -172,9 +179,14 @@ UM.Dialog { id: lighter_is_higher Layout.fillWidth: true - Layout.preferredHeight: UM.Theme.getSize("toolbox_action_button").height + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + Layout.preferredHeight: UM.Theme.getSize("setting_control").height objectName: "Lighter_Is_Higher" - model: [catalog.i18nc("@item:inlistbox", "Darker is higher"), catalog.i18nc("@item:inlistbox", "Lighter is higher")] + textRole: "text" + model: [ + { text: catalog.i18nc("@item:inlistbox", "Darker is higher") }, + { text: catalog.i18nc("@item:inlistbox", "Lighter is higher") } + ] onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) } } @@ -189,6 +201,7 @@ UM.Dialog UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: catalog.i18nc("@action:label", "Color Model") Layout.alignment: Qt.AlignVCenter @@ -203,10 +216,15 @@ UM.Dialog { id: color_model Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + Layout.preferredHeight: UM.Theme.getSize("setting_control").height objectName: "ColorModel" - model: [catalog.i18nc("@item:inlistbox", "Linear"), catalog.i18nc("@item:inlistbox", "Translucency")] + textRole: "text" + model: [ + { text: catalog.i18nc("@item:inlistbox", "Linear") }, + { text: catalog.i18nc("@item:inlistbox", "Translucency") } + ] onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) } - Layout.preferredHeight: UM.Theme.getSize("toolbox_action_button").height } Cura.ToolTip @@ -220,6 +238,7 @@ UM.Dialog UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: catalog.i18nc("@action:label", "1mm Transmittance (%)") Layout.alignment: Qt.AlignVCenter @@ -232,25 +251,26 @@ UM.Dialog Cura.TextField { - id: transmittance Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width selectByMouse: true objectName: "Transmittance" validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ } onTextChanged: manager.onTransmittanceChanged(text) - } - Cura.ToolTip - { - text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.") - visible: transmittance.hovered || transmittance_label.containsMouse - targetPoint: Qt.point(transmittance.x + Math.round(transmittance.width / 2), 0) - y: transmittance.y + transmittance.height + UM.Theme.getSize("default_margin").height + Cura.ToolTip + { + text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.") + visible: parent.hovered || transmittance_label.containsMouse + targetPoint: Qt.point(parent.x + Math.round(parent.width / 2), 0) + y: parent.y + parent.height + UM.Theme.getSize("default_margin").height + } } UM.Label { Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width text: catalog.i18nc("@action:label", "Smoothing") Layout.alignment: Qt.AlignVCenter @@ -262,14 +282,15 @@ UM.Dialog } } - Slider + Cura.SpinBox { id: smoothing Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width objectName: "Smoothing" to: 100.0 stepSize: 1.0 - onValueChanged: { manager.onSmoothingChanged(value) } + onValueChanged: manager.onSmoothingChanged(value) } Cura.ToolTip @@ -293,18 +314,20 @@ UM.Dialog onAccepted: manager.onOkButtonClicked() onRejected: manager.onCancelButtonClicked() + buttonSpacing: UM.Theme.getSize("default_margin").width + rightButtons: [ - Button - { - id: ok_button - text: catalog.i18nc("@action:button", "OK") - onClicked: manager.onOkButtonClicked() - }, - Button + Cura.TertiaryButton { id: cancel_button text: catalog.i18nc("@action:button", "Cancel") onClicked: manager.onCancelButtonClicked() + }, + Cura.PrimaryButton + { + id: ok_button + text: catalog.i18nc("@action:button", "OK") + onClicked: manager.onOkButtonClicked() } ] } From 26470440f08a1bdc71f132993ffcea4e2b399156 Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 18 Feb 2022 14:21:37 +0100 Subject: [PATCH 06/79] Update buttons in work space dialog Use Cura-styled buttons Use dialog accecpt-reject handlers CURA-8688 --- plugins/3MFReader/WorkspaceDialog.qml | 48 ++++++++------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 450f01fbd5..781c12ad84 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -432,44 +432,24 @@ UM.Dialog } } } - Item - { - id: buttonsItem - width: parent.width - height: childrenRect.height - anchors.bottom: parent.bottom - anchors.right: parent.right - Button + + buttonSpacing: UM.Theme.getSize("default_margin").width + + rightButtons: [ + Cura.TertiaryButton { id: cancel_button - text: catalog.i18nc("@action:button","Cancel"); - onClicked: { manager.onCancelButtonClicked() } - enabled: true - anchors.bottom: parent.bottom - anchors.right: ok_button.left - anchors.rightMargin: 2 * screenScaleFactor - } - Button + text: catalog.i18nc("@action:button", "Cancel") + onClicked: reject() + }, + Cura.PrimaryButton { id: ok_button - anchors.right: parent.right - anchors.bottom: parent.bottom - text: catalog.i18nc("@action:button","Open"); - onClicked: { manager.closeBackend(); manager.onOkButtonClicked() } + text: catalog.i18nc("@action:button", "Open") + onClicked: accept() } - } + ] - - function accept() { - manager.closeBackend(); - manager.onOkButtonClicked(); - base.visible = false; - base.accept(); - } - - function reject() { - manager.onCancelButtonClicked(); - base.visible = false; - base.rejected(); - } + onRejected: manager.onCancelButtonClicked() + onAccepted: manager.onOkButtonClicked() } From 7be54a47ec1c4067f7b946a07a0b43adef65045c Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 18 Feb 2022 16:00:03 +0100 Subject: [PATCH 07/79] Use cura-styled button in settings pick dialog CURA-8688 --- plugins/PerObjectSettingsTool/SettingPickDialog.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/PerObjectSettingsTool/SettingPickDialog.qml b/plugins/PerObjectSettingsTool/SettingPickDialog.qml index 33710acc06..b14e9f3082 100644 --- a/plugins/PerObjectSettingsTool/SettingPickDialog.qml +++ b/plugins/PerObjectSettingsTool/SettingPickDialog.qml @@ -13,7 +13,6 @@ UM.Dialog id: settingPickDialog title: catalog.i18nc("@title:window", "Select Settings to Customize for this model") - width: screenScaleFactor * 360 property var additional_excluded_settings @@ -126,10 +125,10 @@ UM.Dialog } rightButtons: [ - Button + Cura.TertiaryButton { text: catalog.i18nc("@action:button", "Close") - onClicked: settingPickDialog.visible = false + onClicked: reject() } ] } \ No newline at end of file From ec186f140b7d5dcdcfeea49474ee76f0ccd5fa7c Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 18 Feb 2022 16:01:51 +0100 Subject: [PATCH 08/79] Use cura-styled button in about page CURA-8688 --- resources/qml/Dialogs/AboutDialog.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index d917656c9f..d08b9658db 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -165,12 +165,11 @@ UM.Dialog } } - rightButtons: Cura.SecondaryButton + rightButtons: Cura.TertiaryButton { //: Close about dialog button id: closeButton text: catalog.i18nc("@action:button", "Close") - - onClicked: base.visible = false; + onClicked: reject() } } From 2ed1894a27d140d25bbb7168f9ea76c21b48e979 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 18 Feb 2022 16:11:18 +0100 Subject: [PATCH 09/79] Set Dialog margin as it was in 4.13 CURA-8688 --- resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml index 18517d5e96..15540e1964 100644 --- a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml @@ -21,6 +21,8 @@ UM.Dialog width: minimumWidth height: minimumHeight + margin: UM.Theme.getSize("thick_margin").width + property var changesModel: Cura.UserChangesModel { id: userChangesModel } onVisibilityChanged: From 84fe432239f17dcb896cce62cba7b0e4db98523e Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 18 Feb 2022 16:11:25 +0100 Subject: [PATCH 10/79] Use cura-styled button in machines page CURA-8688 --- resources/qml/Preferences/MachinesPage.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index 48f53169f3..98ed48ed47 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -120,9 +120,7 @@ UM.ManagementPage id: actionDialog minimumWidth: UM.Theme.getSize("modal_window_minimum").width minimumHeight: UM.Theme.getSize("modal_window_minimum").height - maximumWidth: minimumWidth * 3 - maximumHeight: minimumHeight * 3 - rightButtons: Button + rightButtons: Cura.TertiaryButton { text: catalog.i18nc("@action:button", "Close") icon.name: "dialog-close" From d333b4639c29937e4ac993b966809aa9bd217c96 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 18 Feb 2022 17:20:49 +0100 Subject: [PATCH 11/79] Align per object settings visibility checkbox with icon CURA-8688 --- plugins/PerObjectSettingsTool/PerObjectItem.qml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectItem.qml b/plugins/PerObjectSettingsTool/PerObjectItem.qml index ac78da7850..d5582b9643 100644 --- a/plugins/PerObjectSettingsTool/PerObjectItem.qml +++ b/plugins/PerObjectSettingsTool/PerObjectItem.qml @@ -10,16 +10,24 @@ import Cura 1.0 as Cura UM.TooltipArea { - x: model.depth * UM.Theme.getSize("default_margin").width; - text: model.description; + x: model.depth * UM.Theme.getSize("default_margin").width + text: model.description - width: childrenRect.width; - height: childrenRect.height; + width: childrenRect.width + height: childrenRect.height + + Item + { + id: spacer + width: 5 + } UM.CheckBox { id: check + anchors.left: spacer.right + text: definition.label checked: addedSettingsModel.getVisible(model.key) From c00eb5b432c6842ff872e086d6b893e27a967b94 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 18 Feb 2022 18:15:48 +0100 Subject: [PATCH 12/79] Align checkbox with category icon in per object visibility settings dialog and preferences visibility settings. Move "Information" icon to the right of checkboxes in settings visibilty preferences page. This allows clean aligning of checkboxes with category icon. CURA-8688 --- .../PerObjectCategory.qml | 19 +++++++++++++------ .../PerObjectSettingsTool/PerObjectItem.qml | 3 ++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectCategory.qml b/plugins/PerObjectSettingsTool/PerObjectCategory.qml index 3f95d4e021..1800555b9d 100644 --- a/plugins/PerObjectSettingsTool/PerObjectCategory.qml +++ b/plugins/PerObjectSettingsTool/PerObjectCategory.qml @@ -11,19 +11,26 @@ import ".." Button { id: base; - background: Item { } + background: Item {} contentItem: Row { spacing: UM.Theme.getSize("default_lining").width - UM.RecolorImage + Item //Wrapper to give space before icon with fixed width. This allows aligning checkbox with category icon. { - anchors.verticalCenter: parent.verticalCenter - height: (label.height / 2) | 0 + height: label.height width: height - source: base.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight"); - color: base.hovered ? palette.highlight : palette.buttonText + anchors.verticalCenter: parent.verticalCenter + + UM.RecolorImage + { + 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 + } } UM.RecolorImage { diff --git a/plugins/PerObjectSettingsTool/PerObjectItem.qml b/plugins/PerObjectSettingsTool/PerObjectItem.qml index d5582b9643..0c8015541e 100644 --- a/plugins/PerObjectSettingsTool/PerObjectItem.qml +++ b/plugins/PerObjectSettingsTool/PerObjectItem.qml @@ -19,7 +19,8 @@ UM.TooltipArea Item { id: spacer - width: 5 + // Align checkbox with PerObjectCategory icon + width: UM.Theme.getSize("default_margin").width } UM.CheckBox From 104a34d05ad5bc2a6a5e4f95e2e7ad0af55f5d36 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 21 Feb 2022 10:46:39 +0100 Subject: [PATCH 13/79] Vertically center aligns "Material", "PrintCore" and dropdowns in extruder configuration menu. CURA-8688 --- resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 8a637f3870..f3cef1a819 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -278,6 +278,7 @@ Item width: selectors.controlWidth height: parent.height + anchors.verticalCenter: parent.verticalCenter focusPolicy: Qt.ClickFocus @@ -289,6 +290,7 @@ Item } onClicked: materialsMenu.popup() } + Item { width: instructionButton.width + 2 * UM.Theme.getSize("narrow_margin").width @@ -331,6 +333,7 @@ Item tooltip: text height: parent.height width: selectors.controlWidth + anchors.verticalCenter: parent.verticalCenter focusPolicy: Qt.ClickFocus enabled: enabledCheckbox.checked From 26434f3db9723b3c5c225b1c3e8dea3b9e5dfa79 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 21 Feb 2022 11:19:14 +0100 Subject: [PATCH 14/79] SettingPickDialog was very wide due to the screen factor scaling being removed. This gives it a fixed width the same as other dialogs. CURA-8688 --- plugins/PerObjectSettingsTool/SettingPickDialog.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/PerObjectSettingsTool/SettingPickDialog.qml b/plugins/PerObjectSettingsTool/SettingPickDialog.qml index b14e9f3082..0eb75676eb 100644 --- a/plugins/PerObjectSettingsTool/SettingPickDialog.qml +++ b/plugins/PerObjectSettingsTool/SettingPickDialog.qml @@ -13,6 +13,7 @@ UM.Dialog id: settingPickDialog title: catalog.i18nc("@title:window", "Select Settings to Customize for this model") + width: UM.Theme.getSize("small_popup_dialog").width property var additional_excluded_settings From 30ca9ab46922fd5da6b1ccde299b0e93770d0c3e Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 21 Feb 2022 15:44:16 +0100 Subject: [PATCH 15/79] Update spinbox to new design. Add reusable UnderlineBackground Component for background of newly designed elements. CURA-8688 --- resources/qml/SpinBox.qml | 68 +++++++++++++++++++++++++- resources/themes/cura-light/theme.json | 4 ++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/resources/qml/SpinBox.qml b/resources/qml/SpinBox.qml index d064da4f18..c3e6e4fd50 100644 --- a/resources/qml/SpinBox.qml +++ b/resources/qml/SpinBox.qml @@ -4,6 +4,8 @@ import QtQuick 2.2 import QtQuick.Controls 2.15 +import UM 1.5 as UM + // This component extends the funtionality of QtControls 2.x Spinboxes to // - be able to contain fractional values // - hava a "prefix" and a "suffix". A validator is added that recognizes this pre-, suf-fix combo. When adding a custom @@ -33,11 +35,15 @@ Item signal editingFinished() implicitWidth: spinBox.implicitWidth implicitHeight: spinBox.implicitHeight + SpinBox { id: spinBox anchors.fill: base editable: base.editable + topPadding: 0 + bottomPadding: 0 + padding: UM.Theme.getSize("spinbox").height / 4 // The stepSize of the SpinBox is intentionally set to be always `1` // As SpinBoxes can only contain integer values the `base.stepSize` is concidered the precision/resolution @@ -65,11 +71,21 @@ Item base.value = value * base.stepSize; } + background: Item + { + // Makes space between buttons and textfield transparent + opacity: 0 + } + + + //TextField should be swapped with UM.TextField when it is restyled contentItem: TextField { text: spinBox.textFromValue(spinBox.value, spinBox.locale) + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + background: UM.UnderlineBackground {} + selectByMouse: base.editable - background: Item {} validator: base.validator onActiveFocusChanged: @@ -80,5 +96,55 @@ Item } } } + + down.indicator: Rectangle + { + x: spinBox.mirrored ? parent.width - width : 0 + height: parent.height + width: height + + UM.UnderlineBackground { + color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") + } + + // Minus icon + Rectangle + { + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + width: parent.width / 4 + height: 2 + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + } + } + + up.indicator: Rectangle + { + x: spinBox.mirrored ? 0 : parent.width - width + height: parent.height + width: height + + UM.UnderlineBackground { + color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") + } + + // Plus Icon + Rectangle + { + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + width: parent.width / 3.5 + height: 2 + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + } + Rectangle + { + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + width: 2 + height: parent.width / 3.5 + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + } + } } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index f0b52242dd..1b23ae9307 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -184,6 +184,7 @@ "primary_hover": [48, 182, 231, 255], "primary_text": [255, 255, 255, 255], "border": [127, 127, 127, 255], + "border_field": [180, 180, 180, 255], "text_selection": [156,195, 255, 127], "secondary": [240, 240, 240, 255], "secondary_shadow": [216, 216, 216, 255], @@ -231,6 +232,7 @@ "window_disabled_background": [0, 0, 0, 255], "text": [25, 25, 25, 255], + "text_disabled": [180, 180, 180, 255], "text_detail": [174, 174, 174, 128], "text_link": [25, 110, 240, 255], "text_inactive": [174, 174, 174, 255], @@ -617,6 +619,8 @@ "checkbox_radius": [0.25, 0.25], "checkbox_label_padding": [0.5, 0.5], + "spinbox": [6.0, 3.0], + "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], "tooltip_arrow_margins": [2.0, 2.0], From 0b581c0e329861c2ac3546b12eaf34daa8137cd6 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 21 Feb 2022 16:18:44 +0100 Subject: [PATCH 16/79] Update buttons in firmware page. CURA-8688 --- .../FirmwareUpdater/FirmwareUpdaterMachineAction.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml index 47387daa28..c2b80bf7cb 100644 --- a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml +++ b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml @@ -49,22 +49,22 @@ Cura.MachineAction width: childrenRect.width spacing: UM.Theme.getSize("default_margin").width property string firmwareName: Cura.MachineManager.activeMachine.getDefaultFirmwareName() - Button + Cura.SecondaryButton { id: autoUpgradeButton text: catalog.i18nc("@action:button", "Automatically upgrade Firmware") - enabled: parent.firmwareName != "" && canUpdateFirmware + //enabled: parent.firmwareName != "" && canUpdateFirmware onClicked: { updateProgressDialog.visible = true; activeOutputDevice.updateFirmware(parent.firmwareName); } } - Button + Cura.SecondaryButton { id: manualUpgradeButton text: catalog.i18nc("@action:button", "Upload custom Firmware") - enabled: canUpdateFirmware + //enabled: canUpdateFirmware onClicked: { customFirmwareDialog.open() @@ -173,7 +173,7 @@ Cura.MachineAction } rightButtons: [ - Button + Cura.SecondaryButton { text: catalog.i18nc("@action:button", "Close") enabled: manager.firmwareUpdater != null ? manager.firmwareUpdater.firmwareUpdateState != 1 : true From bc4222c34f7ee5fc8f9012f7bc46885accaae82f Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 22 Feb 2022 09:16:50 +0100 Subject: [PATCH 17/79] Remove comments CURA-8688 --- plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml index c2b80bf7cb..c679c4328c 100644 --- a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml +++ b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml @@ -53,7 +53,7 @@ Cura.MachineAction { id: autoUpgradeButton text: catalog.i18nc("@action:button", "Automatically upgrade Firmware") - //enabled: parent.firmwareName != "" && canUpdateFirmware + enabled: parent.firmwareName != "" && canUpdateFirmware onClicked: { updateProgressDialog.visible = true; @@ -64,7 +64,7 @@ Cura.MachineAction { id: manualUpgradeButton text: catalog.i18nc("@action:button", "Upload custom Firmware") - //enabled: canUpdateFirmware + enabled: canUpdateFirmware onClicked: { customFirmwareDialog.open() From d40e91cc081751c60957b731a335fdda391d0abb Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 22 Feb 2022 10:37:13 +0100 Subject: [PATCH 18/79] Remove unneccesary opacity assignment. Change padding to styled width CURA-8688 --- resources/qml/SpinBox.qml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/resources/qml/SpinBox.qml b/resources/qml/SpinBox.qml index c3e6e4fd50..b93a569e99 100644 --- a/resources/qml/SpinBox.qml +++ b/resources/qml/SpinBox.qml @@ -43,7 +43,7 @@ Item editable: base.editable topPadding: 0 bottomPadding: 0 - padding: UM.Theme.getSize("spinbox").height / 4 + padding: UM.Theme.getSize("narrow_margin").width // The stepSize of the SpinBox is intentionally set to be always `1` // As SpinBoxes can only contain integer values the `base.stepSize` is concidered the precision/resolution @@ -71,12 +71,7 @@ Item base.value = value * base.stepSize; } - background: Item - { - // Makes space between buttons and textfield transparent - opacity: 0 - } - + background: Item {} //TextField should be swapped with UM.TextField when it is restyled contentItem: TextField From 9f75b870a77fface499ab4a2d8f90c8d99e9bde5 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 22 Feb 2022 16:18:01 +0100 Subject: [PATCH 19/79] Swap "+" and "-" made from Rectangle elements for icons. CURA-8688 --- resources/qml/SpinBox.qml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/resources/qml/SpinBox.qml b/resources/qml/SpinBox.qml index b93a569e99..4035515750 100644 --- a/resources/qml/SpinBox.qml +++ b/resources/qml/SpinBox.qml @@ -102,14 +102,13 @@ Item color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") } - // Minus icon - Rectangle + UM.RecolorImage { - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - width: parent.width / 4 - height: 2 + anchors.centerIn: parent + height: parent.height / 2.5 + width: height color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("Minus") } } @@ -123,22 +122,13 @@ Item color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") } - // Plus Icon - Rectangle + UM.RecolorImage { - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - width: parent.width / 3.5 - height: 2 - color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") - } - Rectangle - { - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - width: 2 - height: parent.width / 3.5 + anchors.centerIn: parent + height: parent.height / 2.5 + width: height color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("Plus") } } } From c3abfec535966921c4afd6723687040b4c1d9a2f Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 23 Feb 2022 12:00:11 +0100 Subject: [PATCH 20/79] Combobox height/width was being resized by RowLayout causing it to be squished. Assigned a implicit width/height which is used instead of height/width. CURA-8688 --- resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml | 6 ++++-- resources/themes/cura-light/theme.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml index 15540e1964..5c75993d39 100644 --- a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml @@ -91,10 +91,12 @@ UM.Dialog buttonSpacing: UM.Theme.getSize("thin_margin").width leftButtons: [ - ComboBox + Cura.ComboBox { + implicitHeight: UM.Theme.getSize("combobox_dialog").height + implicitWidth: UM.Theme.getSize("combobox_dialog").width + id: discardOrKeepProfileChangesDropDownButton - width: 300 textRole: "text" model: ListModel diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 1b23ae9307..2c23c0ed17 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -620,6 +620,7 @@ "checkbox_label_padding": [0.5, 0.5], "spinbox": [6.0, 3.0], + "combobox_dialog": [14, 2], "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], From e03176a1fac7caae88029ec1174258d8ab53821e Mon Sep 17 00:00:00 2001 From: casper Date: Wed, 23 Feb 2022 14:09:38 +0100 Subject: [PATCH 21/79] Replace `UM.MessageDialog` with newly added `Cura.MessageDialog` This dialog is different from the `UM.MessageDialog` in that it CURA-8688 --- .../src/qml/components/BackupListItem.qml | 4 ++-- .../resources/qml/DiscoverUM3Action.qml | 2 +- .../resources/qml/MonitorContextMenu.qml | 6 +++--- resources/qml/Cura.qml | 6 +++--- resources/qml/Dialogs/MessageDialog.qml | 20 +++++++++++++++++++ resources/qml/MainWindow/ApplicationMenu.qml | 2 +- resources/qml/MonitorButton.qml | 2 +- .../Preferences/Materials/MaterialsPage.qml | 6 +++--- .../Preferences/Materials/MaterialsView.qml | 2 +- resources/qml/Preferences/ProfilesPage.qml | 4 ++-- 10 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 resources/qml/Dialogs/MessageDialog.qml diff --git a/plugins/CuraDrive/src/qml/components/BackupListItem.qml b/plugins/CuraDrive/src/qml/components/BackupListItem.qml index 41e3fb0bf6..a3b9770718 100644 --- a/plugins/CuraDrive/src/qml/components/BackupListItem.qml +++ b/plugins/CuraDrive/src/qml/components/BackupListItem.qml @@ -87,7 +87,7 @@ Item anchors.top: dataRow.bottom } - UM.MessageDialog + Cura.MessageDialog { id: confirmDeleteDialog title: catalog.i18nc("@dialog:title", "Delete Backup") @@ -96,7 +96,7 @@ Item onAccepted: CuraDrive.deleteBackup(modelData.backup_id) } - UM.MessageDialog + Cura.MessageDialog { id: confirmRestoreDialog title: catalog.i18nc("@dialog:title", "Restore Backup") diff --git a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml index 587ab61613..9c96fdca9e 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml @@ -256,7 +256,7 @@ Cura.MachineAction } } - UM.MessageDialog + Cura.MessageDialog { id: invalidIPAddressMessageDialog title: catalog.i18nc("@title:window", "Invalid IP address") diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml index d95ca8a88e..6fb0d38ea2 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml @@ -133,7 +133,7 @@ Item } } - UM.MessageDialog + Cura.MessageDialog { id: sendToTopConfirmationDialog onAccepted: OutputDevice.sendJobToTop(printJob.key) @@ -142,7 +142,7 @@ Item title: catalog.i18nc("@window:title", "Move print job to top") } - UM.MessageDialog + Cura.MessageDialog { id: deleteConfirmationDialog onAccepted: OutputDevice.deleteJobFromQueue(printJob.key) @@ -151,7 +151,7 @@ Item title: catalog.i18nc("@window:title", "Delete print job") } - UM.MessageDialog + Cura.MessageDialog { id: abortConfirmationDialog onAccepted: printJob.setState("abort") diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 67a3617033..70fae42162 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -585,7 +585,7 @@ UM.MainWindow } } - UM.MessageDialog + Cura.MessageDialog { id: exitConfirmationDialog title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName) @@ -743,14 +743,14 @@ UM.MainWindow } } - UM.MessageDialog + Cura.MessageDialog { id: packageInstallDialog title: catalog.i18nc("@window:title", "Install Package") standardButtons: StandardButton.Ok } - UM.MessageDialog + Cura.MessageDialog { id: infoMultipleFilesWithGcodeDialog title: catalog.i18nc("@title:window", "Open File(s)") diff --git a/resources/qml/Dialogs/MessageDialog.qml b/resources/qml/Dialogs/MessageDialog.qml new file mode 100644 index 0000000000..0735064548 --- /dev/null +++ b/resources/qml/Dialogs/MessageDialog.qml @@ -0,0 +1,20 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import UM 1.5 as UM +import Cura 1.5 as Cura + +// Wrapper around the UM.MessageBox with the primary/secondarybuttons +// set to Cura.PrimaryButton and Cura.SecondaryButton respectively +UM.MessageDialog +{ + primaryButton: Cura.PrimaryButton + { + text: model.text + } + + secondaryButton: Cura.TertiaryButton + { + text: model.text + } +} \ No newline at end of file diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 763f199902..4cbde8424d 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -55,7 +55,7 @@ Item onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args) } - UM.MessageDialog + Cura.MessageDialog { id: newProjectDialog diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 54b9437a6c..0f8c178767 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -322,7 +322,7 @@ Item onClicked: confirmationDialog.visible = true } - UM.MessageDialog + Cura.MessageDialog { id: confirmationDialog diff --git a/resources/qml/Preferences/Materials/MaterialsPage.qml b/resources/qml/Preferences/Materials/MaterialsPage.qml index 2e4ded685d..c9e6cf07a1 100644 --- a/resources/qml/Preferences/Materials/MaterialsPage.qml +++ b/resources/qml/Preferences/Materials/MaterialsPage.qml @@ -310,7 +310,7 @@ Item } // Dialogs - UM.MessageDialog + Cura.MessageDialog { id: confirmRemoveMaterialDialog title: catalog.i18nc("@title:window", "Confirm Remove") @@ -337,7 +337,7 @@ Item { const result = Cura.ContainerManager.importMaterialContainer(fileUrl); - const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base); + const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base); messageDialog.standardButtons = Dialog.Ok; messageDialog.title = catalog.i18nc("@title:window", "Import Material"); switch (result.status) @@ -365,7 +365,7 @@ Item { const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl); - const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base); + const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base); messageDialog.title = catalog.i18nc("@title:window", "Export Material"); messageDialog.standardButtons = Dialog.Ok; switch (result.status) diff --git a/resources/qml/Preferences/Materials/MaterialsView.qml b/resources/qml/Preferences/Materials/MaterialsView.qml index d71a6f398f..915d36ff57 100644 --- a/resources/qml/Preferences/Materials/MaterialsView.qml +++ b/resources/qml/Preferences/Materials/MaterialsView.qml @@ -119,7 +119,7 @@ Item width: base.width property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height - UM.MessageDialog + Cura.MessageDialog { id: confirmDiameterChangeDialog diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index f9d5d9c4b3..1ee86f9f0c 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -137,7 +137,7 @@ UM.ManagementPage base.toActivateNewQuality = false; } } - UM.MessageDialog + Cura.MessageDialog { id: messageDialog standardButtons: Dialog.Ok @@ -245,7 +245,7 @@ UM.ManagementPage } // Confirmation dialog for removing a profile - UM.MessageDialog + Cura.MessageDialog { id: confirmRemoveQualityDialog From 111c095f3231fb577d78a8691a649e14ea8e253e Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 23 Feb 2022 15:04:58 +0100 Subject: [PATCH 22/79] Swap RadioButton for styled Cura.RadioButton CURA-8688 --- resources/qml/Preferences/GeneralPage.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index d6c1861dde..a91a888a12 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -894,7 +894,7 @@ UM.PreferencesPage text: catalog.i18nc("@info:tooltip", "When checking for updates, only check for stable releases.") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - RadioButton + Cura.RadioButton { id: checkUpdatesOptionStable text: catalog.i18nc("@option:radio", "Stable releases only") @@ -910,7 +910,7 @@ UM.PreferencesPage text: catalog.i18nc("@info:tooltip", "When checking for updates, check for both stable and for beta releases.") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - RadioButton + Cura.RadioButton { id: checkUpdatesOptionBeta text: catalog.i18nc("@option:radio", "Stable and Beta releases") From b14e29d214d15c5bdaf0f04f6e45c9af0ad1dd99 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 23 Feb 2022 15:13:36 +0100 Subject: [PATCH 23/79] Make general menu combox wider CURA-8688 --- .../Dialogs/DiscardOrKeepProfileChangesDialog.qml | 4 ++-- resources/qml/Preferences/GeneralPage.qml | 12 ++++++------ resources/themes/cura-light/theme.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml index 5c75993d39..11aeac1722 100644 --- a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml @@ -93,8 +93,8 @@ UM.Dialog leftButtons: [ Cura.ComboBox { - implicitHeight: UM.Theme.getSize("combobox_dialog").height - implicitWidth: UM.Theme.getSize("combobox_dialog").width + implicitHeight: UM.Theme.getSize("combobox_wide").height + implicitWidth: UM.Theme.getSize("combobox_wide").width id: discardOrKeepProfileChangesDropDownButton textRole: "text" diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index a91a888a12..2b340a7ab5 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -554,8 +554,8 @@ UM.PreferencesPage model: comboBoxList textRole: "text" - width: UM.Theme.getSize("setting_control").width - height: UM.Theme.getSize("setting_control").height + width: UM.Theme.getSize("combobox_wide").width + height: UM.Theme.getSize("combobox_wide").height currentIndex: { @@ -711,8 +711,8 @@ UM.PreferencesPage Cura.ComboBox { id: choiceOnOpenProjectDropDownButton - width: UM.Theme.getSize("setting_control").width - height: UM.Theme.getSize("setting_control").height + width: UM.Theme.getSize("combobox_wide").width + height: UM.Theme.getSize("combobox_wide").height model: ListModel { @@ -779,8 +779,8 @@ UM.PreferencesPage Cura.ComboBox { id: choiceOnProfileOverrideDropDownButton - width: UM.Theme.getSize("setting_control").width - height: UM.Theme.getSize("setting_control").height + width: UM.Theme.getSize("combobox_wide").width + height: UM.Theme.getSize("combobox_wide").height model: ListModel { id: discardOrKeepProfileListModel diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 2c23c0ed17..3754a0fb64 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -620,7 +620,7 @@ "checkbox_label_padding": [0.5, 0.5], "spinbox": [6.0, 3.0], - "combobox_dialog": [14, 2], + "combobox_wide": [14, 2], "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], From 4510a8b06ed1a36b82389b59645e1ebb06417721 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 23 Feb 2022 15:15:46 +0100 Subject: [PATCH 24/79] Down spinbox button highlighting up spinbox button when clicked. CURA-8688 --- resources/qml/SpinBox.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/SpinBox.qml b/resources/qml/SpinBox.qml index 4035515750..b5e93804b1 100644 --- a/resources/qml/SpinBox.qml +++ b/resources/qml/SpinBox.qml @@ -99,7 +99,7 @@ Item width: height UM.UnderlineBackground { - color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") + color: spinBox.down.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") } UM.RecolorImage From 7a2b609b321b5f37a84b4a7c991dd9a0aab58b8a Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 23 Feb 2022 15:28:38 +0100 Subject: [PATCH 25/79] Left Margin for Listview items was doubled. Remove margin to left align text with "Add a script" button. Swap default buttons for Cura.Primary/Cura.Secondary Buttons CURA-8688 --- plugins/PostProcessingPlugin/PostProcessingPlugin.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index 24dc141fef..17256eb9ea 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -68,7 +68,6 @@ UM.Dialog anchors { left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width right: parent.right rightMargin: base.textMargin } @@ -214,7 +213,7 @@ UM.Dialog } } } - Button + Cura.SecondaryButton { id: addButton text: catalog.i18nc("@action", "Add a script") @@ -453,7 +452,7 @@ UM.Dialog } } - rightButtons: Button + rightButtons: Cura.PrimaryButton { text: catalog.i18nc("@action:button", "Close") onClicked: dialog.accept() From 4a71278d7c0a8a04bbd2a9e9453d480d780c827e Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 25 Feb 2022 10:54:03 +0100 Subject: [PATCH 26/79] Fix monitor page CURA-8688 --- plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml index 6fb0d38ea2..03e9477d08 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml @@ -4,6 +4,7 @@ import QtQuick 2.3 import QtQuick.Controls 2.15 import UM 1.5 as UM +import Cura 1.6 as Cura /** * A MonitorInfoBlurb is an extension of the GenericPopUp used to show static information (vs. interactive context From 2d4a389825accc83f1a6c88789e8e929972794de Mon Sep 17 00:00:00 2001 From: casper Date: Fri, 25 Feb 2022 12:12:57 +0100 Subject: [PATCH 27/79] Fix dark mode issues for about dialog CURA-8688 --- resources/qml/Dialogs/AboutDialog.qml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index d08b9658db..8de28a72f0 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -19,6 +19,8 @@ UM.Dialog width: minimumWidth height: minimumHeight + backgroundColor: UM.Theme.getColor("main_background") + Rectangle { id: header @@ -50,7 +52,7 @@ UM.Dialog UM.I18nCatalog{id: catalog; name: "cura"} } - Label + UM.Label { id: version @@ -63,7 +65,7 @@ UM.Dialog } } - Label + UM.Label { id: description width: parent.width @@ -76,7 +78,7 @@ UM.Dialog anchors.topMargin: UM.Theme.getSize("default_margin").height } - Label + UM.Label { id: creditsNotes width: parent.width @@ -105,20 +107,20 @@ UM.Dialog delegate: Row { spacing: UM.Theme.getSize("narrow_margin").width - Label + UM.Label { text: "%2".arg(model.url).arg(model.name) width: (projectsList.width * 0.25) | 0 elide: Text.ElideRight onLinkActivated: Qt.openUrlExternally(link) } - Label + UM.Label { text: model.description elide: Text.ElideRight width: ((projectsList.width * 0.6) | 0) - parent.spacing * 2 - projectsListScrollBar.width } - Label + UM.Label { text: model.license elide: Text.ElideRight From aba025b5b6e7837fe5c486c6ca1fc4d096b00f30 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 25 Feb 2022 13:32:02 +0100 Subject: [PATCH 28/79] Unify dialog background coloring. CURA-8988 --- resources/qml/Dialogs/AboutDialog.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 8de28a72f0..e6d15af2d9 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -19,8 +19,6 @@ UM.Dialog width: minimumWidth height: minimumHeight - backgroundColor: UM.Theme.getColor("main_background") - Rectangle { id: header From 7bbea625583b1824860f3cd09bca581d9c0481dd Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 25 Feb 2022 14:56:24 +0100 Subject: [PATCH 29/79] Add base_colors to theme If the value of a color is a string, there will be an attempt to fetch this color from base_colors. CURA-8688 --- resources/themes/cura-dark/theme.json | 24 +++++++++++++++++++++++- resources/themes/cura-light/theme.json | 25 +++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 296d4d7145..abf6e1bf2f 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -4,8 +4,30 @@ "inherits": "cura-light" }, + "base_colors": + { + "background_1": [212, 212, 212, 255], + "background_2": [57, 57, 58, 255], + "background_3": [85, 85, 87, 255], + "background_4": [23, 23, 23, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [212, 212, 212, 255], + "border_accent_1": [255, 255, 255, 255], + "border_accent_2": [16, 70, 156, 255], + "border_field": [57, 57, 58, 255], + + "text_default": [255, 255, 255, 255], + "text_disabled": [118, 118, 118, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [255, 255, 255, 255], + "text_link_hover": [156, 195, 255, 255], + "text_lighter": [243, 243, 243, 255] + }, + "colors": { - "main_background": [39, 44, 48, 255], + "main_background": "background_1", "detail_background": [63, 63, 63, 255], "message_background": [39, 44, 48, 255], "wide_lining": [31, 36, 39, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 3754a0fb64..a7cc206766 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -170,10 +170,31 @@ } }, + "base_colors": { + "background_1": [255, 255, 255, 255], + "background_2": [243, 243, 243, 255], + "background_3": [232, 240, 253, 255], + "background_4": [3, 12, 66, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [212, 212, 212, 255], + "border_accent_1": [25, 110, 240, 255], + "border_accent_2": [16, 70, 156, 255], + "border_field": [180, 180, 180, 255], + + "text_default": [0, 14, 26, 255], + "text_disabled": [180, 180, 180, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [25, 110, 240, 255], + "text_link_hover": [16, 70, 156, 255], + "text_lighter": [108, 108, 108, 255] + }, + "colors": { - "main_background": [255, 255, 255, 255], - "detail_background": [243, 243, 243, 255], + "main_background": "background_1", + "detail_background": "background_2", "wide_lining": [245, 245, 245, 255], "thick_lining": [180, 180, 180, 255], "lining": [192, 193, 194, 255], From 7ea0167486cb9d3b6569913d0396bff89ef01758 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 25 Feb 2022 15:54:51 +0100 Subject: [PATCH 30/79] Remove border highlight on hover over menu items, as per new designs CURA-8688 --- resources/qml/Widgets/MenuItem.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/Widgets/MenuItem.qml b/resources/qml/Widgets/MenuItem.qml index 059a30e79c..10bc49bd36 100644 --- a/resources/qml/Widgets/MenuItem.qml +++ b/resources/qml/Widgets/MenuItem.qml @@ -47,6 +47,5 @@ UM.MenuItem height: menuItem.height - 2 * UM.Theme.getSize("default_lining").height color: menuItem.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: menuItem.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" } } \ No newline at end of file From 17cab9946d4b6bd085f32ad848b4f535d91374ad Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 25 Feb 2022 18:18:43 +0100 Subject: [PATCH 31/79] Dark theming CURA-8688 --- resources/themes/cura-dark/theme.json | 74 +++++++++++++------------- resources/themes/cura-light/theme.json | 8 +-- 2 files changed, 42 insertions(+), 40 deletions(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index abf6e1bf2f..bb1e8fe6a0 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -6,7 +6,7 @@ "base_colors": { - "background_1": [212, 212, 212, 255], + "background_1": [31, 31, 32, 255], "background_2": [57, 57, 58, 255], "background_3": [85, 85, 87, 255], "background_4": [23, 23, 23, 255], @@ -32,26 +32,28 @@ "message_background": [39, 44, 48, 255], "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], - "lining": [64, 69, 72, 255], + "lining": "border_main", "viewport_overlay": [30, 36, 39, 255], "primary": [12, 169, 227, 255], - "primary_text": [255, 255, 255, 204], + "primary_text": "text_default", "secondary": [95, 95, 95, 255], - "secondary_button": [39, 44, 48, 255], - "secondary_button_hover": [85, 85, 87, 255], + "secondary_button": "background_1", + "secondary_button_hover": "background_3", "secondary_button_text": [255, 255, 255, 255], - "icon": [255, 255, 255, 255], - "toolbar_background": [39, 44, 48, 255], - "toolbar_button_active": [57, 57, 58, 255], - "toolbar_button_hover": [57, 57, 58, 255], - "toolbar_button_active_hover": [57, 57, 58, 255], + "icon": "text_default", + "toolbar_background": "background_1", + "toolbar_button_active": "background_3", + "toolbar_button_hover": "background_3", + "toolbar_button_active_hover": "background_3", - "main_window_header_button_text_inactive": [128, 128, 128, 255], - "main_window_header_background": [14, 14, 14, 255], - "main_window_header_background_gradient": [32, 32, 32, 255], + "main_window_header_button_background_inactive": "background_4", + "main_window_header_button_text_inactive": "text_primary_button", + "main_window_header_button_text_active": "background_4", + "main_window_header_background": "background_4", + "main_window_header_background_gradient": "background_4", "main_window_header_button_background_hovered": [46, 46, 46, 255], "account_sync_state_icon": [255, 255, 255, 204], @@ -60,9 +62,9 @@ "machine_selector_active": [39, 44, 48, 255], "machine_selector_printer_icon": [204, 204, 204, 255], - "text": [255, 255, 255, 204], + "text": "text_default", "text_detail": [255, 255, 255, 172], - "text_link": [25, 110, 240, 255], + "text_link": "accent_1", "text_inactive": [255, 255, 255, 88], "text_hover": [255, 255, 255, 204], "text_pressed": [255, 255, 255, 204], @@ -79,7 +81,7 @@ "button_hover": [39, 44, 48, 255], "button_active": [67, 72, 75, 255], "button_active_hover": [67, 72, 75, 255], - "button_text": [255, 255, 255, 197], + "button_text": "text_default", "button_disabled": [39, 44, 48, 255], "button_disabled_text": [255, 255, 255, 101], @@ -108,17 +110,17 @@ "tab_active_text": [255, 255, 255, 255], "tab_background": [39, 44, 48, 255], - "action_button": [39, 44, 48, 255], + "action_button": "background_1", "action_button_text": [255, 255, 255, 200], - "action_button_border": [255, 255, 255, 30], + "action_button_border": "border_main", "action_button_hovered": [79, 85, 89, 255], - "action_button_hovered_text": [255, 255, 255, 255], - "action_button_hovered_border": [255, 255, 255, 30], + "action_button_hovered_text": "text_default", + "action_button_hovered_border": "border_main", "action_button_active": [39, 44, 48, 30], - "action_button_active_text": [255, 255, 255, 255], + "action_button_active_text": "text_default", "action_button_active_border": [255, 255, 255, 100], - "action_button_disabled": [85, 85, 87, 255], - "action_button_disabled_text": [103, 103, 104, 255], + "action_button_disabled": "background_3", + "action_button_disabled_text": "text_disabled", "action_button_disabled_border": [255, 255, 255, 30], "scrollbar_background": [39, 44, 48, 0], @@ -142,12 +144,12 @@ "setting_category_active_border": [39, 44, 48, 0], "setting_category_active_hover_border": [12, 169, 227, 255], - "setting_control": [43, 48, 52, 255], + "setting_control": "background_2", "setting_control_selected": [34, 39, 42, 38], - "setting_control_highlight": [43, 48, 52, 255], + "setting_control_highlight": "background_2", "setting_control_border": [255, 255, 255, 38], "setting_control_border_highlight": [12, 169, 227, 255], - "setting_control_text": [255, 255, 255, 181], + "setting_control_text": "text_default", "setting_control_button": [255, 255, 255, 127], "setting_control_button_hover": [255, 255, 255, 204], "setting_control_disabled": [34, 39, 42, 255], @@ -158,7 +160,7 @@ "setting_validation_error": [212, 31, 53, 255], "setting_validation_warning_background": [62, 54, 46, 255], "setting_validation_warning": [245, 166, 35, 255], - "setting_validation_ok": [43, 48, 52, 255], + "setting_validation_ok": "background_2", "progressbar_background": [255, 255, 255, 48], "progressbar_control": [255, 255, 255, 197], @@ -169,24 +171,24 @@ "slider_handle": [255, 255, 255, 255], "slider_handle_active": [68, 192, 255, 255], - "checkbox": [43, 48, 52, 255], + "checkbox": "background_1", "checkbox_hover": [43, 48, 52, 255], - "checkbox_border": [255, 255, 255, 38], + "checkbox_border": "text_disabled", "checkbox_border_hover": [255, 255, 255, 38], - "checkbox_mark": [255, 255, 255, 181], - "checkbox_square": [118, 118, 118, 255], - "checkbox_text": [255, 255, 255, 181], + "checkbox_mark": "text_default", + "checkbox_square": "text_disabled", + "checkbox_text": "text_default", - "tooltip": [39, 44, 48, 255], - "tooltip_text": [255, 255, 255, 204], + "tooltip": "background_2", + "tooltip_text": "text_default", - "tool_panel_background": [39, 44, 48, 255], + "tool_panel_background": "background_1", "tool_button_border": [255, 255, 255, 38], "y_axis": [96, 96, 255, 255], - "viewport_background": [31, 36, 39, 255], + "viewport_background": "background_1", "volume_outline": [12, 169, 227, 128], "buildplate": [169, 169, 169, 255], "buildplate_grid_minor": [154, 154, 155, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index a7cc206766..e6215fb842 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -212,15 +212,15 @@ "icon": [8, 7, 63, 255], - "primary_button": [25, 110, 240, 255], + "primary_button": "accent_1", "primary_button_shadow": [27, 95, 202, 255], "primary_button_hover": [16, 70, 156, 255], "primary_button_text": [255, 255, 255, 255], - "secondary_button": [255, 255, 255, 255], + "secondary_button": "text_default", "secondary_button_shadow": [216, 216, 216, 255], "secondary_button_hover": [232, 240, 253, 255], - "secondary_button_text": [25, 110, 240, 255], + "secondary_button_text": "accent_1", "main_window_header_background": [8, 7, 63, 255], "main_window_header_background_gradient": [25, 23, 91, 255], @@ -240,7 +240,7 @@ "machine_selector_text_active": [255, 255, 255, 255], "machine_selector_printer_icon": [8, 7, 63, 255], - "action_panel_secondary": [25, 110, 240, 255], + "action_panel_secondary": "accent_1", "first_run_shadow": [50, 50, 50, 255], From b4edb89eb8635abcfdebba0ef54f9adea2034dce Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 28 Feb 2022 10:21:16 +0100 Subject: [PATCH 32/79] 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 33/79] 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 7fd6601b1ac323b03b6e2b302d6d71962dad59d6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 11:37:51 +0100 Subject: [PATCH 34/79] 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 0a214b2c47dbfee93ea257bb5306020c64195aa1 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 28 Feb 2022 11:41:21 +0100 Subject: [PATCH 35/79] Fix dark mode issues Post processing plugin Also revamped the post-processing list a bit. CURA-8688 --- .../PostProcessingPlugin.qml | 278 +++++++++--------- 1 file changed, 136 insertions(+), 142 deletions(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index 17256eb9ea..a095ccb352 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -15,14 +15,15 @@ UM.Dialog id: dialog title: catalog.i18nc("@title:window", "Post Processing Plugin") - width: 700 * screenScaleFactor; - height: 500 * screenScaleFactor; - minimumWidth: 400 * screenScaleFactor; - minimumHeight: 250 * screenScaleFactor; + width: 700 * screenScaleFactor + height: 500 * screenScaleFactor + minimumWidth: 400 * screenScaleFactor + minimumHeight: 250 * screenScaleFactor onVisibleChanged: { - if(!visible) //Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack. + // Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack. + if (!visible) { manager.writeScriptsToStack() } @@ -35,8 +36,7 @@ UM.Dialog property int columnWidth: Math.round((base.width / 2) - UM.Theme.getSize("default_margin").width) property int textMargin: UM.Theme.getSize("narrow_margin").width property string activeScriptName - SystemPalette{ id: palette } - SystemPalette{ id: disabledPalette; colorGroup: SystemPalette.Disabled } + anchors.fill: parent ButtonGroup @@ -51,14 +51,12 @@ UM.Dialog spacing: base.textMargin - Label + UM.Label { id: activeScriptsHeader text: catalog.i18nc("@label", "Post Processing Scripts") anchors.left: parent.left - anchors.leftMargin: base.textMargin anchors.right: parent.right - anchors.rightMargin: base.textMargin font: UM.Theme.getFont("large_bold") elide: Text.ElideRight } @@ -79,137 +77,142 @@ UM.Dialog id: activeScriptsScrollBar } model: manager.scriptList - delegate: Item + + delegate: Button { + id: activeScriptButton + width: parent.width - activeScriptsScrollBar.width - height: activeScriptButton.height - Button - { - id: activeScriptButton - text: manager.getScriptLabelByKey(modelData.toString()) - ButtonGroup.group: selectedScriptGroup - width: parent.width - height: UM.Theme.getSize("setting").height - checkable: true + height: UM.Theme.getSize("standard_list_lineheight").height - checked: + ButtonGroup.group: selectedScriptGroup + checkable: true + + checked: + { + if (manager.selectedScriptIndex == index) { - if (manager.selectedScriptIndex == index) - { - base.activeScriptName = manager.getScriptLabelByKey(modelData.toString()) - return true - } - else - { - return false - } - } - onClicked: - { - forceActiveFocus() - manager.setSelectedScriptIndex(index) base.activeScriptName = manager.getScriptLabelByKey(modelData.toString()) + return true } - - background: Rectangle + else { - color: activeScriptButton.checked ? palette.highlight : "transparent" + return false } - contentItem: Label - { - wrapMode: Text.Wrap - text: activeScriptButton.text - elide: Text.ElideRight - color: activeScriptButton.checked ? palette.highlightedText : palette.text - } - } - Button + background: Rectangle { - id: removeButton - text: "x" - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - onClicked: manager.removeScriptByIndex(index) - contentItem: Item + color: activeScriptButton.checked ? UM.Theme.getColor("background_3") : "transparent" + } + + onClicked: + { + forceActiveFocus() + manager.setSelectedScriptIndex(index) + base.activeScriptName = manager.getScriptLabelByKey(modelData.toString()) + } + + RowLayout + { + anchors.fill: parent + height: childrenRect.height + + UM.Label { + Layout.fillWidth: true + text: manager.getScriptLabelByKey(modelData.toString()) + } + + Item + { + id: downButton + Layout.preferredWidth: height + Layout.fillHeight: true + enabled: index != manager.scriptList.length - 1 + + MouseArea + { + anchors.fill: parent + onClicked: + { + if (manager.selectedScriptIndex == index) + { + manager.setSelectedScriptIndex(index + 1) + } + return manager.moveScript(index, index + 1) + } + } + UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - width: Math.round(removeButton.width / 2.7) - height: Math.round(removeButton.height / 2.7) - sourceSize.height: width - color: palette.text - source: UM.Theme.getIcon("Cancel") - } - } - - } - Button - { - id: downButton - text: "" - anchors.right: removeButton.left - anchors.verticalCenter: parent.verticalCenter - enabled: index != manager.scriptList.length - 1 - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - onClicked: - { - if (manager.selectedScriptIndex == index) - { - manager.setSelectedScriptIndex(index + 1) - } - return manager.moveScript(index, index + 1) - } - contentItem: Item - { - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: Math.round(downButton.width / 2.5) - height: Math.round(downButton.height / 2.5) - sourceSize.height: width - color: downButton.enabled ? palette.text : disabledPalette.text + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: parent.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") source: UM.Theme.getIcon("ChevronSingleDown") } } - } - Button - { - id: upButton - text: "" - enabled: index != 0 - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - anchors.right: downButton.left - anchors.verticalCenter: parent.verticalCenter - onClicked: + Item { - if (manager.selectedScriptIndex == index) + id: upButton + Layout.preferredWidth: height + Layout.fillHeight: true + enabled: index != 0 + + MouseArea { - manager.setSelectedScriptIndex(index - 1) + anchors.fill: parent + onClicked: + { + if (manager.selectedScriptIndex == index) + { + manager.setSelectedScriptIndex(index - 1) + } + return manager.moveScript(index, index - 1) + } } - return manager.moveScript(index, index - 1) - } - contentItem: Item - { + UM.RecolorImage { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - width: Math.round(upButton.width / 2.5) - height: Math.round(upButton.height / 2.5) - sourceSize.height: width - color: upButton.enabled ? palette.text : disabledPalette.text + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: upButton.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") source: UM.Theme.getIcon("ChevronSingleUp") } } + + Item + { + id: removeButton + Layout.preferredWidth: height + Layout.fillHeight: true + + MouseArea + { + anchors.fill: parent + onClicked: manager.removeScriptByIndex(index) + } + + UM.RecolorImage + { + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: UM.Theme.getColor("text") + source: UM.Theme.getIcon("Cancel") + } + } } } } @@ -217,28 +220,26 @@ UM.Dialog { id: addButton text: catalog.i18nc("@action", "Add a script") - anchors.left: parent.left - anchors.leftMargin: base.textMargin onClicked: scriptsMenu.open() } - Menu + } + + Cura.Menu + { + id: scriptsMenu + + Models.Instantiator { - id: scriptsMenu - width: parent.width + model: manager.loadedScriptList - Models.Instantiator + Cura.MenuItem { - model: manager.loadedScriptList - - MenuItem - { - text: manager.getScriptLabelByKey(modelData.toString()) - onTriggered: manager.addScriptToList(modelData.toString()) - } - - onObjectAdded: scriptsMenu.insertItem(index, object) - onObjectRemoved: scriptsMenu.removeItem(object) + text: manager.getScriptLabelByKey(modelData.toString()) + onTriggered: manager.addScriptToList(modelData.toString()) } + + onObjectAdded: scriptsMenu.insertItem(index, object) + onObjectRemoved: scriptsMenu.removeItem(object) } } @@ -303,16 +304,9 @@ UM.Dialog width: listview.width height: { - if(provider.properties.enabled == "True") + if (provider.properties.enabled == "True" && model.type != undefined) { - if(model.type != undefined) - { - return UM.Theme.getSize("section").height - } - else - { - return 0 - } + return UM.Theme.getSize("section").height; } else { @@ -392,10 +386,10 @@ UM.Dialog function onShowTooltip(text) { - tooltip.text = text - var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0) - tooltip.show(position) - tooltip.target.x = position.x + 1 + tooltip.text = text; + var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0); + tooltip.show(position); + tooltip.target.x = position.x + 1; } function onHideTooltip() { tooltip.hide() } @@ -452,7 +446,7 @@ UM.Dialog } } - rightButtons: Cura.PrimaryButton + rightButtons: Cura.TertiaryButton { text: catalog.i18nc("@action:button", "Close") onClicked: dialog.accept() From 78c19559d26af068443a542593c4fe3c66e7188f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 11:41:56 +0100 Subject: [PATCH 36/79] 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 37/79] 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 38/79] 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 From 83661ebd7ff1047c870e49b9677db40e1e2d7fd5 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 28 Feb 2022 12:02:51 +0100 Subject: [PATCH 39/79] Remove duplicate color for primary button. Adjust secondary button colors to account for different colors being used between light and dark themes. CURA-8688 --- resources/qml/SecondaryButton.qml | 2 +- resources/themes/cura-dark/theme.json | 2 ++ resources/themes/cura-light/theme.json | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/qml/SecondaryButton.qml b/resources/qml/SecondaryButton.qml index ba4e0bb2c1..d8027af3fc 100644 --- a/resources/qml/SecondaryButton.qml +++ b/resources/qml/SecondaryButton.qml @@ -11,7 +11,7 @@ Cura.ActionButton { color: UM.Theme.getColor("secondary_button") textColor: UM.Theme.getColor("secondary_button_text") - outlineColor: UM.Theme.getColor("secondary_button_text") + outlineColor: UM.Theme.getColor("border_accent_1") disabledColor: UM.Theme.getColor("action_button_disabled") textDisabledColor: UM.Theme.getColor("action_button_disabled_text") hoverColor: UM.Theme.getColor("secondary_button_hover") diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 5d90ac93e4..2706992517 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -56,6 +56,8 @@ "main_window_header_background_gradient": "background_4", "main_window_header_button_background_hovered": [46, 46, 46, 255], + "secondary_button_text": "text_secondary_button", + "account_sync_state_icon": [255, 255, 255, 204], "machine_selector_printer_icon": [204, 204, 204, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 6ba4867b6d..a13cc59c90 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -211,12 +211,11 @@ "icon": [8, 7, 63, 255], - "primary_button": [25, 110, 240, 255], "primary_button": "accent_1", "primary_button_hover": [16, 70, 156, 255], "primary_button_text": [255, 255, 255, 255], - "secondary_button": "text_default", + "secondary_button": "background_1", "secondary_button_shadow": [216, 216, 216, 255], "secondary_button_hover": [232, 240, 253, 255], "secondary_button_text": "accent_1", From 6159ccbdc791f628260d416f56cc0076c8fff824 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 28 Feb 2022 12:20:46 +0100 Subject: [PATCH 40/79] Fix darkmode issues in the `DiscoverUM3Actions` dialog CURA-8688 --- .../resources/qml/DiscoverUM3Action.qml | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml index 9c96fdca9e..e68f552f7b 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml @@ -35,8 +35,8 @@ Cura.MachineAction id: discoverUM3Action spacing: UM.Theme.getSize("default_margin").height - SystemPalette { id: palette } UM.I18nCatalog { id: catalog; name:"cura" } + UM.Label { id: pageTitle @@ -53,9 +53,9 @@ Cura.MachineAction Row { - spacing: UM.Theme.getSize("default_lining").width + spacing: UM.Theme.getSize("thin_margin").width - Button + Cura.SecondaryButton { id: addButton text: catalog.i18nc("@action:button", "Add"); @@ -65,7 +65,7 @@ Cura.MachineAction } } - Button + Cura.SecondaryButton { id: editButton text: catalog.i18nc("@action:button", "Edit") @@ -76,7 +76,7 @@ Cura.MachineAction } } - Button + Cura.SecondaryButton { id: removeButton text: catalog.i18nc("@action:button", "Remove") @@ -84,7 +84,7 @@ Cura.MachineAction onClicked: manager.removeManualDevice(base.selectedDevice.key, base.selectedDevice.ipAddress) } - Button + Cura.SecondaryButton { id: rediscoverButton text: catalog.i18nc("@action:button", "Refresh") @@ -122,23 +122,18 @@ Cura.MachineAction base.completeProperties = base.selectedDevice != null && base.selectedDevice.getProperty("incomplete") != "true"; } Component.onCompleted: manager.startDiscovery() - delegate: Rectangle + + delegate: UM.Label { - height: printNameLabel.height - color: ListView.isCurrentItem ? palette.highlight : index % 2 ? palette.base : palette.alternateBase + id: printNameLabel width: listview.width - Label - { - id: printNameLabel - height: contentHeight - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.right: parent.right - text: listview.model[index].name - color: parent.ListView.isCurrentItem ? palette.highlightedText : palette.text - elide: Text.ElideRight - renderType: Text.NativeRendering - } + height: contentHeight + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + + anchors.right: parent.right + text: listview.model[index].name + elide: Text.ElideRight MouseArea { @@ -151,6 +146,11 @@ Cura.MachineAction } } } + + background: Rectangle + { + color: parent.ListView.isCurrentItem ? UM.Theme.getColor("background_3") : "transparent" + } } } UM.Label @@ -175,20 +175,19 @@ Cura.MachineAction font: UM.Theme.getFont("large_bold") elide: Text.ElideRight } - Grid + GridLayout { visible: base.completeProperties width: parent.width columns: 2 - property real labelWidth: Math.round(width * 0.5) UM.Label { - width: labelWidth + Layout.fillWidth: true text: catalog.i18nc("@label", "Type") } UM.Label { - width: labelWidth + Layout.fillWidth: true text: { if (base.selectedDevice) { @@ -199,22 +198,22 @@ Cura.MachineAction } UM.Label { - width: labelWidth + Layout.fillWidth: true text: catalog.i18nc("@label", "Firmware version") } UM.Label { - width: labelWidth + Layout.fillWidth: true text: base.selectedDevice ? base.selectedDevice.firmwareVersion : "" } UM.Label { - width: labelWidth + Layout.fillWidth: true text: catalog.i18nc("@label", "Address") } UM.Label { - width: labelWidth + Layout.fillWidth: true text: base.selectedDevice ? base.selectedDevice.ipAddress : "" } } @@ -246,7 +245,7 @@ Cura.MachineAction text: catalog.i18nc("@label", "The printer at this address has not yet responded." ) } - Button + Cura.SecondaryButton { text: catalog.i18nc("@action:button", "Connect") enabled: (base.selectedDevice && base.completeProperties && base.selectedDevice.clusterSize > 0) ? true : false @@ -264,7 +263,7 @@ Cura.MachineAction standardButtons: Dialog.Ok } - Dialog + Cura.MessageDialog { id: manualPrinterDialog property string printerKey @@ -273,6 +272,7 @@ Cura.MachineAction title: catalog.i18nc("@title:window", "Printer Address") width: UM.Theme.getSize("small_popup_dialog").width + height: UM.Theme.getSize("small_popup_dialog").height anchors.centerIn: Overlay.overlay From 14b0f66c995f9c4dcdbdbcae0944076ed3b72847 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:14:23 +0100 Subject: [PATCH 41/79] Remove hardcoded value for visibility preset selector CURA-8688 --- resources/qml/Preferences/SettingVisibilityPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/SettingVisibilityPage.qml b/resources/qml/Preferences/SettingVisibilityPage.qml index 0cc10be0f9..bdb252f3c2 100644 --- a/resources/qml/Preferences/SettingVisibilityPage.qml +++ b/resources/qml/Preferences/SettingVisibilityPage.qml @@ -105,7 +105,7 @@ UM.PreferencesPage Cura.ComboBox { id: visibilityPreset - width: 150 * screenScaleFactor + width: UM.Theme.getSize("action_button").width anchors { top: parent.top From 6713056a49630588578a9ba69adb946635f688f8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:15:39 +0100 Subject: [PATCH 42/79] Ensure that setting visibility filter is styled CURA-8688 --- resources/qml/Preferences/SettingVisibilityPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/SettingVisibilityPage.qml b/resources/qml/Preferences/SettingVisibilityPage.qml index bdb252f3c2..1e2ab6a365 100644 --- a/resources/qml/Preferences/SettingVisibilityPage.qml +++ b/resources/qml/Preferences/SettingVisibilityPage.qml @@ -84,7 +84,7 @@ UM.PreferencesPage } } - TextField + Cura.TextField { id: filter From c6e2561dbb418a3ad8cb82740740858bdbd45244 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:19:56 +0100 Subject: [PATCH 43/79] Fix styling for Machine Settings CURA-8688 --- plugins/MachineSettingsAction/MachineSettingsAction.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index 0f0ffac8cd..7f72fea4c3 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -5,7 +5,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -88,7 +88,7 @@ Cura.MachineAction } } - Label + UM.Label { id: machineNameLabel anchors.top: parent.top @@ -97,7 +97,6 @@ Cura.MachineAction text: Cura.MachineManager.activeMachine.name horizontalAlignment: Text.AlignHCenter font: UM.Theme.getFont("large_bold") - renderType: Text.NativeRendering } UM.TabRow From f7852e4f9daba87faec0af5e73c966c84b34b88f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:22:19 +0100 Subject: [PATCH 44/79] Use correct menu type for setting contet menu CURA-8688 --- resources/qml/Settings/SettingView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 48c658e4e7..2ab98081e7 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -409,7 +409,7 @@ Item } } - Menu + Cura.Menu { id: contextMenu From 1f39a1b87fe9062fed0726a1c68c15359298d7d7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:30:14 +0100 Subject: [PATCH 45/79] Add CuraStyled rename dialog CURA-8688 --- resources/qml/Preferences/ProfilesPage.qml | 6 +- resources/qml/Preferences/RenameDialog.qml | 91 ++++++++++++++++++++++ resources/qml/qmldir | 1 + 3 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 resources/qml/Preferences/RenameDialog.qml diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 1ee86f9f0c..d6522829fe 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -144,7 +144,7 @@ UM.ManagementPage } // Dialog to request a name when creating a new profile - UM.RenameDialog + Cura.RenameDialog { id: createQualityDialog title: catalog.i18nc("@title:window", "Create Profile") @@ -233,7 +233,7 @@ UM.ManagementPage } // Dialog to request a name when duplicating a new profile - UM.RenameDialog + Cura.RenameDialog { id: duplicateQualityDialog title: catalog.i18nc("@title:window", "Duplicate Profile") @@ -263,7 +263,7 @@ UM.ManagementPage } // Dialog to rename a quality profile - UM.RenameDialog + Cura.RenameDialog { id: renameQualityDialog title: catalog.i18nc("@title:window", "Rename Profile") diff --git a/resources/qml/Preferences/RenameDialog.qml b/resources/qml/Preferences/RenameDialog.qml new file mode 100644 index 0000000000..7bf02e92a1 --- /dev/null +++ b/resources/qml/Preferences/RenameDialog.qml @@ -0,0 +1,91 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 2.0 +import QtQuick.Window 2.1 + +import UM 1.5 as UM +import Cura 1.0 as Cura + +UM.Dialog +{ + id: base + property string object: "" + + property alias newName: nameField.text + property bool validName: true + property string validationError + property string dialogTitle: catalog.i18nc("@title:window", "Rename") + property string explanation: catalog.i18nc("@info", "Please provide a new name.") + + title: dialogTitle + + minimumWidth: UM.Theme.getSize("small_popup_dialog").width + minimumHeight: UM.Theme.getSize("small_popup_dialog").height + width: minimumWidth + height: minimumHeight + + property variant catalog: UM.I18nCatalog { name: "cura" } + + signal textChanged(string text) + signal selectText() + onSelectText: + { + nameField.selectAll(); + nameField.focus = true; + } + + Column + { + anchors.fill: parent + + UM.Label + { + text: base.explanation + "\n" //Newline to make some space using system theming. + width: parent.width + wrapMode: Text.WordWrap + } + + Cura.TextField + { + id: nameField + width: parent.width + text: base.object + maximumLength: 40 + selectByMouse: true + onTextChanged: base.textChanged(text) + } + + UM.Label + { + visible: !base.validName + text: base.validationError + } + } + + Item + { + ButtonGroup { + buttons: [cancelButton, okButton] + checkedButton: okButton + } + } + + rightButtons: [ + Cura.SecondaryButton + { + id: cancelButton + text: catalog.i18nc("@action:button","Cancel") + onClicked: base.reject() + }, + Cura.PrimaryButton + { + id: okButton + text: catalog.i18nc("@action:button", "OK") + onClicked: base.accept() + enabled: base.validName + } + ] +} + diff --git a/resources/qml/qmldir b/resources/qml/qmldir index 2d5839f798..8ddacc56e4 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -47,3 +47,4 @@ GcodeTextArea 1.0 GcodeTextArea.qml NumericTextFieldWithUnit 1.0 NumericTextFieldWithUnit.qml PrintHeadMinMaxTextField 1.0 PrintHeadMinMaxTextField.qml SimpleCheckBox 1.0 SimpleCheckBox.qml +RenameDialog 1.0 RenameDialog.qml From cc29e2398b6502034291e2deca0b6f6b1d15cb56 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:35:56 +0100 Subject: [PATCH 46/79] Set correct text highlight color for TextField CURA-8688 --- resources/qml/Widgets/TextField.qml | 1 + resources/themes/cura-light/theme.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Widgets/TextField.qml b/resources/qml/Widgets/TextField.qml index bace79a98a..66894eca69 100644 --- a/resources/qml/Widgets/TextField.qml +++ b/resources/qml/Widgets/TextField.qml @@ -24,6 +24,7 @@ TextField font: UM.Theme.getFont("default") color: UM.Theme.getColor("text") renderType: Text.NativeRendering + selectionColor: UM.Theme.getColor("text_selection") leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width states: [ diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 6ba4867b6d..e22c02d5d5 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -206,7 +206,6 @@ "text_selection": [156, 195, 255, 127], "border": [127, 127, 127, 255], "border_field": [180, 180, 180, 255], - "text_selection": [156,195, 255, 127], "secondary": [240, 240, 240, 255], "icon": [8, 7, 63, 255], From bb1a2a998831b582e5e02865eaf0e0a79c2507fa Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:46:29 +0100 Subject: [PATCH 47/79] Fix QML warning CURA-8688 --- resources/qml/Preferences/GeneralPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 2b340a7ab5..52e141ad3c 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -14,7 +14,7 @@ UM.PreferencesPage title: catalog.i18nc("@title:tab", "General") id: generalPreferencesPage - width: parent.width + width: parent ? parent.width: 0 function setDefaultLanguage(languageCode) { From ea588d85fb3ab5bc55dd48878162662ef9cb2d55 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:47:27 +0100 Subject: [PATCH 48/79] Remove unneeded anchor from workspace summary dialog CURA-8688 --- resources/qml/Dialogs/WorkspaceSummaryDialog.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/Dialogs/WorkspaceSummaryDialog.qml b/resources/qml/Dialogs/WorkspaceSummaryDialog.qml index 00c4fb8f50..c5c7248a98 100644 --- a/resources/qml/Dialogs/WorkspaceSummaryDialog.qml +++ b/resources/qml/Dialogs/WorkspaceSummaryDialog.qml @@ -272,7 +272,6 @@ UM.Dialog UM.CheckBox { id: dontShowAgainCheckbox - anchors.left: parent.left text: catalog.i18nc("@action:label", "Don't show project summary on save again") checked: dontShowAgain } From 79ee9ffc917a975f95aab5b8a683fa564be08a14 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 13:48:30 +0100 Subject: [PATCH 49/79] Fix warning spam in MainWindowHeader CURA-8688 --- resources/qml/MainWindow/MainWindowHeader.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index c38e1bb4ab..3f22879992 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -78,7 +78,6 @@ Item background: Rectangle { radius: UM.Theme.getSize("action_button_radius").width - width: contents.width color: { if (stageSelectorButton.checked) From 62f6643a49c65a1b03f139fb7bcc0b1d1c09e611 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 14:08:26 +0100 Subject: [PATCH 50/79] Add checkbox disabled color to darktheme CURA-8688 --- resources/themes/cura-dark/theme.json | 1 + resources/themes/cura-light/theme.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 5d90ac93e4..55dc777fd7 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -159,6 +159,7 @@ "checkbox_mark": "text_default", "checkbox_square": "text_disabled", "checkbox_text": "text_default", + "checkbox_disabled": "background_2", "tooltip": "background_2", "tooltip_text": "text_default", diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index e22c02d5d5..9504ed6300 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -327,7 +327,7 @@ "checkbox_border": [180, 180, 180, 255], "checkbox_border_hover": [25, 110, 240, 255], "checkbox_mark": [35, 35, 35, 255], - "checkbox_disabled": [223, 223, 223, 255], + "checkbox_disabled": "background_2", "checkbox_text": [0, 12, 26, 255], "tooltip": [25, 25, 25, 255], From ce86e025d9e7b4f2017f1a0ccd775e1dc81869ae Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 28 Feb 2022 14:56:07 +0100 Subject: [PATCH 51/79] New style highlighting on borders CURA-8688 --- resources/qml/Widgets/ComboBox.qml | 9 +++------ resources/qml/Widgets/RadioButton.qml | 2 +- resources/qml/Widgets/TextField.qml | 1 + resources/themes/cura-dark/theme.json | 2 +- resources/themes/cura-light/theme.json | 7 +++++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index 121c5f15da..a9e48e5a60 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -26,21 +26,18 @@ ComboBox { name: "disabled" when: !control.enabled - PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")} + PropertyChanges { target: background; color: UM.Theme.getColor("setting_control_disabled")} PropertyChanges { target: contentLabel; color: UM.Theme.getColor("setting_control_disabled_text")} }, State { name: "highlighted" when: control.hovered || control.activeFocus - PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_highlight")} + PropertyChanges { target: background; liningColor: UM.Theme.getColor("border_main_light")} } ] - background: UM.UnderlineBackground - { - id: backgroundRectangle - } + background: UM.UnderlineBackground{} indicator: UM.RecolorImage { diff --git a/resources/qml/Widgets/RadioButton.qml b/resources/qml/Widgets/RadioButton.qml index 96c2d95f56..428eb8a4e5 100644 --- a/resources/qml/Widgets/RadioButton.qml +++ b/resources/qml/Widgets/RadioButton.qml @@ -38,7 +38,7 @@ RadioButton { name: "highlighted" when: radioButton.hovered || radioButton.activeFocus - PropertyChanges { target: indicator; border.color: UM.Theme.getColor("accent_1")} + PropertyChanges { target: indicator; border.color: UM.Theme.getColor("border_main_light")} } ] diff --git a/resources/qml/Widgets/TextField.qml b/resources/qml/Widgets/TextField.qml index bace79a98a..959506ff2b 100644 --- a/resources/qml/Widgets/TextField.qml +++ b/resources/qml/Widgets/TextField.qml @@ -43,6 +43,7 @@ TextField { name: "hovered" when: textField.hovered || textField.activeFocus + PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("border_main_light")} } ] diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 2706992517..fe18818d99 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -157,7 +157,7 @@ "checkbox": "background_1", "checkbox_hover": [43, 48, 52, 255], "checkbox_border": "text_disabled", - "checkbox_border_hover": [255, 255, 255, 38], + "checkbox_border_hover": "border_main", "checkbox_mark": "text_default", "checkbox_square": "text_disabled", "checkbox_text": "text_default", diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index a13cc59c90..9c6e043eee 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -323,7 +323,7 @@ "quality_slider_available": [0, 0, 0, 255], "checkbox": [255, 255, 255, 255], - "checkbox_hover": [255, 255, 255, 255], + "checkbox_hover": "border_main", "checkbox_border": [180, 180, 180, 255], "checkbox_border_hover": [25, 110, 240, 255], "checkbox_mark": [35, 35, 35, 255], @@ -423,7 +423,10 @@ "cloud_unavailable": [153, 153, 153, 255], "connection_badge_background": [255, 255, 255, 255], "warning_badge_background": [0, 0, 0, 255], - "error_badge_background": [255, 255, 255, 255] + "error_badge_background": [255, 255, 255, 255], + + "border_field_light": [180, 180, 180, 255], + "border_main_light": [212, 212, 212, 255] }, "sizes": { From 5725f3d57fb82c63c629147bce26a6198a6312ff Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 15:46:04 +0100 Subject: [PATCH 52/79] Fix height of syncMaterialCards CURA-8688 --- resources/qml/Preferences/Materials/MaterialsSyncDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml index 0360e2c94b..e592be6d5d 100644 --- a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml +++ b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml @@ -266,7 +266,7 @@ Window border.color: UM.Theme.getColor("lining") border.width: UM.Theme.getSize("default_lining").width width: printerList.width - printerListScrollBar.width - height: UM.Theme.getSize("card").height + height: UM.Theme.getSize("machine_selector_icon").height + 2 * UM.Theme.getSize("default_margin").height property string syncStatus: { From 38b947f0fb17c3389618ea9f16de84fe03d00603 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 15:57:36 +0100 Subject: [PATCH 53/79] Fix width in multiply dialog CURA-8688 --- resources/qml/Menus/ContextMenu.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Menus/ContextMenu.qml b/resources/qml/Menus/ContextMenu.qml index f25b3f70e5..1bba79e2c1 100644 --- a/resources/qml/Menus/ContextMenu.qml +++ b/resources/qml/Menus/ContextMenu.qml @@ -133,6 +133,7 @@ Cura.Menu focus: true from: 1 to: 99 + width: 2 * UM.Theme.getSize("button").width } } } From f31b8051df321369ca47f279e0db49275c8ceb13 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 28 Feb 2022 15:59:56 +0100 Subject: [PATCH 54/79] Fix darkmode issues in the Workspace dialog CURA-8688 --- plugins/3MFReader/WorkspaceDialog.qml | 469 +++++++++++++------------- 1 file changed, 239 insertions(+), 230 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 781c12ad84..898b1ea993 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -6,7 +6,7 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 import QtQuick.Window 2.2 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.1 as Cura UM.Dialog @@ -19,9 +19,7 @@ UM.Dialog width: minimumWidth height: Math.max(dialogSummaryItem.height + 2 * buttonsItem.height, minimumHeight) // 2 * button height to also have some extra space around the button relative to the button size - property int comboboxHeight: 15 * screenScaleFactor - property int spacerHeight: 10 * screenScaleFactor - property int doubleSpacerHeight: 20 * screenScaleFactor + property int comboboxHeight: UM.Theme.getSize("default_margin").height onClosing: manager.notifyClosed() onVisibleChanged: @@ -46,10 +44,6 @@ UM.Dialog id: catalog name: "cura" } - SystemPalette - { - id: palette - } ListModel { @@ -68,45 +62,39 @@ UM.Dialog { width: parent.width height: childrenRect.height - spacing: 2 * screenScaleFactor - Label + spacing: UM.Theme.getSize("default_margin").height + + Column { - id: titleLabel - text: catalog.i18nc("@action:title", "Summary - Cura Project") - font.pointSize: 18 - } - Rectangle - { - id: separator - color: palette.text width: parent.width - height: 1 - } - Item // Spacer - { - height: doubleSpacerHeight - width: height + height: cildrenRect.height + + UM.Label + { + id: titleLabel + text: catalog.i18nc("@action:title", "Summary - Cura Project") + font: UM.Theme.getFont("large") + } + + Rectangle + { + id: separator + color: UM.Theme.getColor("text") + width: parent.width + height: UM.Theme.getSize("default_lining").height + } } - Row + Item { - height: childrenRect.height width: parent.width - Label - { - text: catalog.i18nc("@action:label", "Printer settings") - font.bold: true - width: (parent.width / 3) | 0 - } - Item - { - // spacer - height: spacerHeight - width: (parent.width / 3) | 0 - } + height: childrenRect.height + UM.TooltipArea { id: machineResolveStrategyTooltip + anchors.top: parent.top + anchors.right: parent.right width: (parent.width / 3) | 0 height: visible ? comboboxHeight : 0 visible: base.visible && machineResolveComboBox.model.count > 1 @@ -157,64 +145,65 @@ UM.Dialog } } } - } - Row - { - width: parent.width - height: childrenRect.height - Label + + Column { - text: catalog.i18nc("@action:label", "Type") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.machineType - width: (parent.width / 3) | 0 + width: parent.width + height: cildrenRect.height + + UM.Label + { + id: printer_settings_label + text: catalog.i18nc("@action:label", "Printer settings") + font: UM.Theme.getFont("default_bold") + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Type") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.machineType + width: (parent.width / 3) | 0 + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.machineName + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } } } - Row + Item { width: parent.width height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.machineName - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - } - Item // Spacer - { - height: doubleSpacerHeight - width: height - } - Row - { - height: childrenRect.height - width: parent.width - Label - { - text: catalog.i18nc("@action:label", "Profile settings") - font.bold: true - width: (parent.width / 3) | 0 - } - Item - { - // spacer - height: spacerHeight - width: (parent.width / 3) | 0 - } UM.TooltipArea { - id: qualityChangesResolveTooltip + anchors.right: parent.right + anchors.top: parent.top width: (parent.width / 3) | 0 height: visible ? comboboxHeight : 0 visible: manager.qualityChangesConflict @@ -232,96 +221,105 @@ UM.Dialog } } } + + Column + { + width: parent.width + height: cildrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Profile settings") + font: UM.Theme.getFont("default_bold") + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Name") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.qualityName + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Intent") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.intentName + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Not in profile") + visible: manager.numUserSettings != 0 + width: (parent.width / 3) | 0 + } + UM.Label + { + text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings) + visible: manager.numUserSettings != 0 + width: (parent.width / 3) | 0 + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Derivative from") + visible: manager.numSettingsOverridenByQualityChanges != 0 + width: (parent.width / 3) | 0 + } + UM.Label + { + text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges) + width: (parent.width / 3) | 0 + visible: manager.numSettingsOverridenByQualityChanges != 0 + wrapMode: Text.WordWrap + } + } + } } - Row + + Item { width: parent.width height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "Name") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.qualityName - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - } - Row - { - width: parent.width - height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "Intent") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.intentName - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - } - Row - { - width: parent.width - height: manager.numUserSettings != 0 ? childrenRect.height : 0 - Label - { - text: catalog.i18nc("@action:label", "Not in profile") - width: (parent.width / 3) | 0 - } - Label - { - text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings) - width: (parent.width / 3) | 0 - } - visible: manager.numUserSettings != 0 - } - Row - { - width: parent.width - height: manager.numSettingsOverridenByQualityChanges != 0 ? childrenRect.height : 0 - Label - { - text: catalog.i18nc("@action:label", "Derivative from") - width: (parent.width / 3) | 0 - } - Label - { - text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges) - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - visible: manager.numSettingsOverridenByQualityChanges != 0 - } - Item // Spacer - { - height: doubleSpacerHeight - width: height - } - Row - { - height: childrenRect.height - width: parent.width - Label - { - text: catalog.i18nc("@action:label", "Material settings") - font.bold: true - width: (parent.width / 3) | 0 - } - Item - { - // spacer - height: spacerHeight - width: (parent.width / 3) | 0 - } + UM.TooltipArea { id: materialResolveTooltip + anchors.right: parent.right + anchors.top: parent.top width: (parent.width / 3) | 0 height: visible ? comboboxHeight : 0 visible: manager.materialConflict @@ -339,76 +337,91 @@ UM.Dialog } } } + + Column + { + width: parent.width + height: cildrenRect.height + Row + { + height: childrenRect.height + width: parent.width + spacing: UM.Theme.getSize("narrow_margin").width + + UM.Label + { + text: catalog.i18nc("@action:label", "Material settings") + font: UM.Theme.getFont("default_bold") + width: (parent.width / 3) | 0 + } + } + + Repeater + { + model: manager.materialLabels + delegate: Row + { + width: parent.width + height: childrenRect.height + UM.Label + { + text: catalog.i18nc("@action:label", "Name") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: modelData + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } + } + } } - Repeater + Column { - model: manager.materialLabels - delegate: Row + width: parent.width + height: cildrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Setting visibility") + font: UM.Theme.getFont("default_bold") + } + Row { width: parent.width height: childrenRect.height - Label + UM.Label { - text: catalog.i18nc("@action:label", "Name") + text: catalog.i18nc("@action:label", "Mode") width: (parent.width / 3) | 0 } - Label + UM.Label { - text: modelData + text: manager.activeMode + width: (parent.width / 3) | 0 + } + } + Row + { + width: parent.width + height: childrenRect.height + visible: manager.hasVisibleSettingsField + UM.Label + { + text: catalog.i18nc("@action:label", "Visible settings:") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings) width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap } } } - Item // Spacer - { - height: doubleSpacerHeight - width: height - } - - Label - { - text: catalog.i18nc("@action:label", "Setting visibility") - font.bold: true - } - Row - { - width: parent.width - height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "Mode") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.activeMode - width: (parent.width / 3) | 0 - } - } - Row - { - width: parent.width - height: childrenRect.height - visible: manager.hasVisibleSettingsField - Label - { - text: catalog.i18nc("@action:label", "Visible settings:") - width: (parent.width / 3) | 0 - } - Label - { - text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings) - width: (parent.width / 3) | 0 - } - } - Item // Spacer - { - height: spacerHeight - width: height - } Row { width: parent.width @@ -418,12 +431,10 @@ UM.Dialog { width: warningLabel.height height: width - source: UM.Theme.getIcon("Information") - color: palette.text - + color: UM.Theme.getColor("text") } - Label + UM.Label { id: warningLabel text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.") @@ -438,13 +449,11 @@ UM.Dialog rightButtons: [ Cura.TertiaryButton { - id: cancel_button text: catalog.i18nc("@action:button", "Cancel") onClicked: reject() }, Cura.PrimaryButton { - id: ok_button text: catalog.i18nc("@action:button", "Open") onClicked: accept() } From 2949c0fcb33c966d771aee37f846a1387121d968 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 28 Feb 2022 16:13:36 +0100 Subject: [PATCH 55/79] Color icon in preference page according to theme color CURA-8688 --- resources/qml/Preferences/GeneralPage.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 52e141ad3c..8fbaadc5c3 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -849,6 +849,7 @@ UM.PreferencesPage hoverBackgroundColor: UM.Theme.getColor("secondary_button_hover") backgroundRadius: width / 2 height: UM.Theme.getSize("small_button_icon").height + color: UM.Theme.getColor("small_button_text") width: height } } From 8dde0f4fd2774892edd39277c6df45081f690d43 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 28 Feb 2022 16:51:34 +0100 Subject: [PATCH 56/79] remove debugging code beepboop CURA-8688 --- resources/qml/MainWindow/ApplicationMenu.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 85a6d05547..0345e6dda5 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -92,7 +92,6 @@ Item target: Cura.Actions.browsePackages function onTriggered() { - print("beepboop") extensionMenu.extensionModel.callExtensionMethod("Marketplace", "show") } } From 7ebc5eaac4a170bdc38eb49a3a29b3ae6bc271eb Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 09:30:02 +0100 Subject: [PATCH 57/79] Use `Cura.TextField` in the spinbox component CURA-8688 --- resources/qml/SpinBox.qml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/resources/qml/SpinBox.qml b/resources/qml/SpinBox.qml index b5e93804b1..3c5a4d95e2 100644 --- a/resources/qml/SpinBox.qml +++ b/resources/qml/SpinBox.qml @@ -5,6 +5,7 @@ import QtQuick 2.2 import QtQuick.Controls 2.15 import UM 1.5 as UM +import Cura 1.5 as Cura // This component extends the funtionality of QtControls 2.x Spinboxes to // - be able to contain fractional values @@ -73,19 +74,14 @@ Item background: Item {} - //TextField should be swapped with UM.TextField when it is restyled - contentItem: TextField + contentItem: Cura.TextField { text: spinBox.textFromValue(spinBox.value, spinBox.locale) - color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") - background: UM.UnderlineBackground {} - - selectByMouse: base.editable validator: base.validator onActiveFocusChanged: { - if(!activeFocus) + if (!activeFocus) { base.editingFinished(); } From 195278aa5505b9c1e350432255a349b8d904dd5e Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 10:20:39 +0100 Subject: [PATCH 58/79] Make all text fields use updated background and lining style. CURA-8688 --- .../qml/MachineSettings/NumericTextFieldWithUnit.qml | 9 ++++----- resources/qml/Settings/SettingTextField.qml | 10 ++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml index 23859e40ec..0e1f296cfa 100644 --- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml +++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml @@ -83,13 +83,12 @@ UM.TooltipArea height: numericTextFieldWithUnit.controlHeight // Background is a rounded-cornered box with filled color as state indication (normal, warning, error, etc.) - background: Rectangle + background: UM.UnderlineBackground { anchors.fill: parent anchors.margins: Math.round(UM.Theme.getSize("default_lining").width) - radius: UM.Theme.getSize("setting_control_radius").width - border.color: + liningColor: { if (!textFieldWithUnit.enabled) { @@ -108,9 +107,9 @@ UM.TooltipArea // Validation is OK. if (textFieldWithUnit.hovered || textFieldWithUnit.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("border_main_light") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("border_field_light") } color: diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index e6afb9e8e3..83b5d2a987 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -26,15 +26,13 @@ SettingItem } } - contents: Rectangle + contents: UM.UnderlineBackground { id: control anchors.fill: parent - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: + liningColor: { if(!enabled) { @@ -54,9 +52,9 @@ SettingItem //Validation is OK. if(hovered || input.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("border_main_light") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("border_field_light") } color: { From 330b3f81191f6a5c98896ca734feafaaf9fa23b9 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 10:26:59 +0100 Subject: [PATCH 59/79] Update settings visibility pages to have correct background color on categories CURA-8688 --- plugins/PerObjectSettingsTool/PerObjectCategory.qml | 4 +++- plugins/PerObjectSettingsTool/SettingPickDialog.qml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectCategory.qml b/plugins/PerObjectSettingsTool/PerObjectCategory.qml index eae74eeb4c..2a0f028d1c 100644 --- a/plugins/PerObjectSettingsTool/PerObjectCategory.qml +++ b/plugins/PerObjectSettingsTool/PerObjectCategory.qml @@ -11,7 +11,9 @@ import ".." Button { id: base; - background: Item {} + background: Rectangle { + color: UM.Theme.getColor("background_3") + } contentItem: Row { diff --git a/plugins/PerObjectSettingsTool/SettingPickDialog.qml b/plugins/PerObjectSettingsTool/SettingPickDialog.qml index 0eb75676eb..d7d8091121 100644 --- a/plugins/PerObjectSettingsTool/SettingPickDialog.qml +++ b/plugins/PerObjectSettingsTool/SettingPickDialog.qml @@ -14,6 +14,7 @@ UM.Dialog title: catalog.i18nc("@title:window", "Select Settings to Customize for this model") width: UM.Theme.getSize("small_popup_dialog").width + backgroundColor: UM.Theme.getColor("background_1") property var additional_excluded_settings @@ -78,12 +79,13 @@ UM.Dialog anchors { top: filterInput.bottom + topMargin: UM.Theme.getSize("default_margin").height left: parent.left right: parent.right bottom: parent.bottom } - ScrollBar.vertical: UM.ScrollBar {} + ScrollBar.vertical: UM.ScrollBar { id: scrollBar } clip: true model: UM.SettingDefinitionsModel @@ -104,7 +106,7 @@ UM.Dialog { id: loader - width: listview.width + width: listview.width - scrollBar.width height: model.type != undefined ? UM.Theme.getSize("section").height : 0 property var definition: model From b129eb805f50e26da834d59b694c222985f38fd1 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 10:35:43 +0100 Subject: [PATCH 60/79] Update message background to match new designs CURA-8688 --- resources/themes/cura-dark/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 28b977db83..a0ac828b20 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -29,7 +29,7 @@ "colors": { "main_background": "background_1", "detail_background": [63, 63, 63, 255], - "message_background": [39, 44, 48, 255], + "message_background": "background_1", "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], "lining": "border_main", From a4b8fe23eb408d476ec7cb89864ca07d21a61efc Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 11:16:14 +0100 Subject: [PATCH 61/79] Update Infill Slider to qt controls 2 CURA-8688 --- .../RecommendedInfillDensitySelector.qml | 107 +++++++++--------- 1 file changed, 53 insertions(+), 54 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index 143eccd042..434945e172 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -1,9 +1,8 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls 2.15 import UM 1.5 as UM import Cura 1.0 as Cura @@ -87,10 +86,9 @@ Item width: parent.width height: UM.Theme.getSize("print_setup_slider_handle").height // The handle is the widest element of the slider - minimumValue: 0 - maximumValue: 100 + from: 0 + to: 100 stepSize: 1 - tickmarksEnabled: true // disable slider when gradual support is enabled enabled: parseInt(infillSteps.properties.value) == 0 @@ -98,53 +96,37 @@ Item // set initial value from stack value: parseInt(infillDensity.properties.value) - style: SliderStyle + //Draw line + background: Rectangle { - //Draw line - groove: Item - { - Rectangle - { - height: UM.Theme.getSize("print_setup_slider_groove").height - width: control.width - UM.Theme.getSize("print_setup_slider_handle").width - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") - } - } + id: backgroundLine + height: UM.Theme.getSize("print_setup_slider_groove").height + width: infillSlider.width - UM.Theme.getSize("print_setup_slider_handle").width + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") - handle: Rectangle - { - id: handleButton - color: control.enabled ? UM.Theme.getColor("primary") : UM.Theme.getColor("quality_slider_unavailable") - implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width - implicitHeight: implicitWidth - radius: Math.round(implicitWidth / 2) - border.color: UM.Theme.getColor("slider_groove_fill") - border.width: UM.Theme.getSize("default_lining").height - } - - tickmarks: Repeater + Repeater { id: repeater - model: control.maximumValue / control.stepSize + 1 + anchors.fill: parent + model: infillSlider.to / infillSlider.stepSize + 1 Rectangle { - color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") + color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") implicitWidth: UM.Theme.getSize("print_setup_slider_tickmarks").width implicitHeight: UM.Theme.getSize("print_setup_slider_tickmarks").height anchors.verticalCenter: parent.verticalCenter // Do not use Math.round otherwise the tickmarks won't be aligned - x: ((styleData.handleWidth / 2) - (implicitWidth / 2) + (index * ((repeater.width - styleData.handleWidth) / (repeater.count-1)))) - radius: Math.round(implicitWidth / 2) + x: ((handleButton.width / 2) - (backgroundLine.implicitWidth / 2) + (index * ((repeater.width - handleButton.width) / (repeater.count-1)))) + radius: Math.round(backgroundLine.implicitWidth / 2) visible: (index % 10) == 0 // Only show steps of 10% - Label + UM.Label { text: index - font: UM.Theme.getFont("default") visible: (index % 20) == 0 // Only show steps of 20% anchors.horizontalCenter: parent.horizontalCenter y: UM.Theme.getSize("thin_margin").height @@ -155,29 +137,46 @@ Item } } - onValueChanged: + handle: Rectangle { - // Don't round the value if it's already the same - if (parseInt(infillDensity.properties.value) == infillSlider.value) + id: handleButton + x: infillSlider.leftPadding + infillSlider.visualPosition * (infillSlider.availableWidth - width) + y: infillSlider.topPadding + infillSlider.availableHeight / 2 - height / 2 + color: infillSlider.enabled ? UM.Theme.getColor("primary") : UM.Theme.getColor("quality_slider_unavailable") + implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width + implicitHeight: implicitWidth + radius: Math.round(implicitWidth / 2) + border.color: UM.Theme.getColor("slider_groove_fill") + border.width: UM.Theme.getSize("default_lining").height + } + + Connections + { + target: infillSlider + function onValueChanged() { - return - } + // Don't round the value if it's already the same + if (parseInt(infillDensity.properties.value) == infillSlider.value) + { + return + } - // Round the slider value to the nearest multiple of 10 (simulate step size of 10) - var roundedSliderValue = Math.round(infillSlider.value / 10) * 10 + // Round the slider value to the nearest multiple of 10 (simulate step size of 10) + var roundedSliderValue = Math.round(infillSlider.value / 10) * 10 - // Update the slider value to represent the rounded value - infillSlider.value = roundedSliderValue + // Update the slider value to represent the rounded value + infillSlider.value = roundedSliderValue - // Update value only if the Recommended mode is Active, - // Otherwise if I change the value in the Custom mode the Recommended view will try to repeat - // same operation - var active_mode = UM.Preferences.getValue("cura/active_mode") + // Update value only if the Recommended mode is Active, + // Otherwise if I change the value in the Custom mode the Recommended view will try to repeat + // same operation + const active_mode = UM.Preferences.getValue("cura/active_mode") - if (active_mode == 0 || active_mode == "simple") - { - Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue) - Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance") + if (active_mode == 0 || active_mode == "simple") + { + Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue) + Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance") + } } } } From bd1b0fb34cc9d8729a97e59050684488a7ad4308 Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 11:36:47 +0100 Subject: [PATCH 62/79] Update usb printing menu to qt controls 2 CURA-8688 --- resources/qml/PrinterOutput/ExtruderBox.qml | 62 +++++++++++-------- resources/qml/PrinterOutput/HeatedBedBox.qml | 41 ++++++------ .../PrinterOutput/ManualPrinterControl.qml | 1 - resources/qml/PrinterOutput/MonitorItem.qml | 3 +- .../qml/PrinterOutput/OutputDeviceHeader.qml | 13 ++-- 5 files changed, 65 insertions(+), 55 deletions(-) diff --git a/resources/qml/PrinterOutput/ExtruderBox.qml b/resources/qml/PrinterOutput/ExtruderBox.qml index b36faf262d..d1d28b3cfe 100644 --- a/resources/qml/PrinterOutput/ExtruderBox.qml +++ b/resources/qml/PrinterOutput/ExtruderBox.qml @@ -1,9 +1,8 @@ -//Copyright (c) 2019 Ultimaker B.V. +//Copyright (c) 2022 Ultimaker B.V. //Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.1 import UM 1.2 as UM import Cura 1.0 as Cura @@ -35,17 +34,17 @@ Item id: background anchors.fill: parent - Label //Extruder name. + // Extruder name. + UM.Label { text: Cura.MachineManager.activeMachine.extruderList[position].name !== "" ? Cura.MachineManager.activeMachine.extruderList[position].name : catalog.i18nc("@label", "Extruder") - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") anchors.left: parent.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width } - Label //Target temperature. + // Target temperature. + UM.Label { id: extruderTargetTemperature text: Math.round(extruderModel.targetHotendTemperature) + "°C" @@ -55,7 +54,8 @@ Item anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.bottom: extruderCurrentTemperature.bottom - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: extruderTargetTemperatureTooltipArea hoverEnabled: true @@ -77,17 +77,20 @@ Item } } } - Label //Temperature indication. + + //Temperature indication. + UM.Label { id: extruderCurrentTemperature text: Math.round(extruderModel.hotendTemperature) + "°C" - color: UM.Theme.getColor("text") font: UM.Theme.getFont("large_bold") anchors.right: extruderTargetTemperature.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + + //For tooltip. + MouseArea { id: extruderCurrentTemperatureTooltipArea hoverEnabled: true @@ -110,7 +113,8 @@ Item } } - Rectangle //Input field for pre-heat temperature. + //Input field for pre-heat temperature. + Rectangle { id: preheatTemperatureControl color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok") @@ -152,14 +156,16 @@ Item width: UM.Theme.getSize("monitor_preheat_temperature_control").width height: UM.Theme.getSize("monitor_preheat_temperature_control").height visible: extruderModel != null ? enabled && extruderModel.canPreHeatHotends && !extruderModel.isPreheating : true - Rectangle //Highlight of input field. + //Highlight of input field. + Rectangle { anchors.fill: parent anchors.margins: UM.Theme.getSize("default_lining").width color: UM.Theme.getColor("setting_control_highlight") opacity: preheatTemperatureControl.hovered ? 1.0 : 0 } - MouseArea //Change cursor on hovering. + //Change cursor on hovering. + MouseArea { id: preheatTemperatureInputMouseArea hoverEnabled: true @@ -182,7 +188,7 @@ Item } } } - Label + UM.Label { id: unit anchors.right: parent.right @@ -191,7 +197,6 @@ Item text: "°C"; color: UM.Theme.getColor("setting_unit") - font: UM.Theme.getFont("default") } TextInput { @@ -299,7 +304,8 @@ Item } } - Rectangle //Material colour indication. + //Material colour indication. + Rectangle { id: materialColor width: Math.floor(materialName.height * 0.75) @@ -313,7 +319,8 @@ Item anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: materialName.verticalCenter - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: materialColorTooltipArea hoverEnabled: true @@ -335,17 +342,17 @@ Item } } } - Label //Material name. + //Material name. + UM.Label { id: materialName text: extruderModel.activeMaterial != null ? extruderModel.activeMaterial.type : "" - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") anchors.left: materialColor.right anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: materialNameTooltipArea hoverEnabled: true @@ -367,17 +374,18 @@ Item } } } - Label //Variant name. + + //Variant name. + UM.Label { id: variantName text: extruderModel.hotendID - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: variantNameTooltipArea hoverEnabled: true @@ -388,7 +396,7 @@ Item { base.showTooltip( base, - {x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y}, + { x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y }, catalog.i18nc("@tooltip", "The nozzle inserted in this extruder.") ); } diff --git a/resources/qml/PrinterOutput/HeatedBedBox.qml b/resources/qml/PrinterOutput/HeatedBedBox.qml index 82a8d8c6b7..9343ca8826 100644 --- a/resources/qml/PrinterOutput/HeatedBedBox.qml +++ b/resources/qml/PrinterOutput/HeatedBedBox.qml @@ -1,9 +1,8 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.4 import UM 1.2 as UM import Cura 1.0 as Cura @@ -20,17 +19,17 @@ Item color: UM.Theme.getColor("main_background") anchors.fill: parent - Label //Build plate label. + // Build plate label. + UM.Label { text: catalog.i18nc("@label", "Build plate") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") anchors.left: parent.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width } - Label //Target temperature. + // Target temperature. + UM.Label { id: bedTargetTemperature text: printerModel != null ? printerModel.targetBedTemperature + "°C" : "" @@ -40,7 +39,8 @@ Item anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.bottom: bedCurrentTemperature.bottom - MouseArea //For tooltip. + // For tooltip. + MouseArea { id: bedTargetTemperatureTooltipArea hoverEnabled: true @@ -62,17 +62,18 @@ Item } } } - Label //Current temperature. + // Current temperature. + UM.Label { id: bedCurrentTemperature text: printerModel != null ? printerModel.bedTemperature + "°C" : "" font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") anchors.right: bedTargetTemperature.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: bedTemperatureTooltipArea hoverEnabled: true @@ -94,7 +95,8 @@ Item } } } - Rectangle //Input field for pre-heat temperature. + //Input field for pre-heat temperature. + Rectangle { id: preheatTemperatureControl color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok") @@ -166,7 +168,7 @@ Item } } } - Label + UM.Label { id: unit anchors.right: parent.right @@ -175,7 +177,6 @@ Item text: "°C"; color: UM.Theme.getColor("setting_unit") - font: UM.Theme.getFont("default") } TextInput { @@ -213,7 +214,8 @@ Item } } - Cura.SecondaryButton // The pre-heat button. + // The pre-heat button. + Cura.SecondaryButton { id: preheatButton height: UM.Theme.getSize("setting_control").height @@ -248,14 +250,15 @@ Item text: { - if(printerModel == null) + if (printerModel == null) { return "" } - if(printerModel.isPreheating ) + if (printerModel.isPreheating ) { return catalog.i18nc("@button Cancel pre-heating", "Cancel") - } else + } + else { return catalog.i18nc("@button", "Pre-heat") } @@ -279,7 +282,7 @@ Item { base.showTooltip( base, - {x: 0, y: preheatButton.mapToItem(base, 0, 0).y}, + { x: 0, y: preheatButton.mapToItem(base, 0, 0).y }, catalog.i18nc("@tooltip of pre-heat", "Heat the bed in advance before printing. You can continue adjusting your print while it is heating, and you won't have to wait for the bed to heat up when you're ready to print.") ); } diff --git a/resources/qml/PrinterOutput/ManualPrinterControl.qml b/resources/qml/PrinterOutput/ManualPrinterControl.qml index bf987b282f..f53a45905c 100644 --- a/resources/qml/PrinterOutput/ManualPrinterControl.qml +++ b/resources/qml/PrinterOutput/ManualPrinterControl.qml @@ -3,7 +3,6 @@ import QtQuick 2.10 import QtQuick.Controls 2.1 -import QtQuick.Layouts 1.3 import UM 1.5 as UM import Cura 1.0 as Cura diff --git a/resources/qml/PrinterOutput/MonitorItem.qml b/resources/qml/PrinterOutput/MonitorItem.qml index 4cf66630e9..a6e78ba837 100644 --- a/resources/qml/PrinterOutput/MonitorItem.qml +++ b/resources/qml/PrinterOutput/MonitorItem.qml @@ -1,8 +1,7 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Layouts 1.1 import UM 1.5 as UM import Cura 1.0 as Cura diff --git a/resources/qml/PrinterOutput/OutputDeviceHeader.qml b/resources/qml/PrinterOutput/OutputDeviceHeader.qml index 9ad946b6af..56c8fcb936 100644 --- a/resources/qml/PrinterOutput/OutputDeviceHeader.qml +++ b/resources/qml/PrinterOutput/OutputDeviceHeader.qml @@ -1,7 +1,9 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.1 import UM 1.2 as UM import Cura 1.0 as Cura @@ -27,7 +29,7 @@ Item height: childrenRect.height color: UM.Theme.getColor("setting_category") - Label + UM.Label { id: outputDeviceNameLabel font: UM.Theme.getFont("large_bold") @@ -38,7 +40,7 @@ Item text: outputDevice != null ? outputDevice.activePrinter.name : "" } - Label + UM.Label { id: outputDeviceAddressLabel text: (outputDevice != null && outputDevice.address != null) ? outputDevice.address : "" @@ -49,11 +51,10 @@ Item anchors.margins: UM.Theme.getSize("default_margin").width } - Label + UM.Label { text: outputDevice != null ? "" : catalog.i18nc("@info:status", "The printer is not connected.") color: outputDevice != null && outputDevice.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") - font: UM.Theme.getFont("default") wrapMode: Text.WordWrap anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width From ceee0e9b4bbbb8c1e0856f1b9aafc71ad5ec79f8 Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 11:38:29 +0100 Subject: [PATCH 63/79] Update `RecommnededQualityProfileSelector` to Controls 2 CURA-8688 --- .../Recommended/RecommendedQualityProfileSelector.qml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 1d924a9223..1176142b3b 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -1,9 +1,8 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls 2.3 as Controls2 +import QtQuick.Controls 2.3 import UM 1.2 as UM import Cura 1.6 as Cura @@ -29,7 +28,7 @@ Item spacing: UM.Theme.getSize("default_margin").height - Controls2.ButtonGroup + ButtonGroup { id: activeProfileButtonGroup exclusive: true From 82173c57660bd876e4ce9b4ccef925c80e4ca47f Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 11:48:15 +0100 Subject: [PATCH 64/79] Update remaining qt controls 1 imports CURA-8688 --- resources/qml/Cura.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 70fae42162..371754e9e0 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -2,11 +2,9 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.15 import QtQuick.Dialogs 1.2 import QtGraphicalEffects 1.0 -import QtQuick.Controls 2.15 as NewControls import UM 1.5 as UM import Cura 1.1 as Cura From 2fdd7b82d503f6a5672b7204a136aaf6f692c76a Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 11:48:41 +0100 Subject: [PATCH 65/79] Update settings extruder comboboxes and material selection combobox to match new designs CURA-8688 --- resources/qml/PrintSetupHeaderButton.qml | 17 +++++------- resources/qml/Settings/SettingExtruder.qml | 14 +++++----- .../qml/Settings/SettingOptionalExtruder.qml | 26 +++++++++---------- resources/themes/cura-dark/theme.json | 6 ++--- 4 files changed, 26 insertions(+), 37 deletions(-) diff --git a/resources/qml/PrintSetupHeaderButton.qml b/resources/qml/PrintSetupHeaderButton.qml index 2583c6b84e..e41f95f778 100644 --- a/resources/qml/PrintSetupHeaderButton.qml +++ b/resources/qml/PrintSetupHeaderButton.qml @@ -36,7 +36,7 @@ ToolButton { target: background color: UM.Theme.getColor("setting_control_disabled") - border.color: UM.Theme.getColor("setting_control_disabled_border") + liningColor: UM.Theme.getColor("setting_control_disabled_border") } }, State @@ -47,7 +47,7 @@ ToolButton { target: background color: UM.Theme.getColor("setting_validation_error_background") - border.color: UM.Theme.getColor("setting_validation_error") + liningColor: UM.Theme.getColor("setting_validation_error") } }, State @@ -58,7 +58,7 @@ ToolButton { target: background color: UM.Theme.getColor("setting_validation_warning_background") - border.color: UM.Theme.getColor("setting_validation_warning") + liningColor: UM.Theme.getColor("setting_validation_warning") } }, State @@ -69,7 +69,7 @@ ToolButton { target: background color: UM.Theme.getColor("setting_control") - border.color: UM.Theme.getColor("setting_control_border_highlight") + liningColor: UM.Theme.getColor("border_main_light") } }, State @@ -80,20 +80,15 @@ ToolButton { target: background color: UM.Theme.getColor("setting_control") - border.color: UM.Theme.getColor("setting_control_border") + liningColor: UM.Theme.getColor("border_field_light") } } ] - background: Rectangle + background: UM.UnderlineBackground { id: background - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - color: UM.Theme.getColor("setting_control") - border.color: UM.Theme.getColor("setting_control_border") - UM.RecolorImage { id: downArrow diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index a7aaa99fb2..d3a50a7eb3 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -5,14 +5,14 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import UM 1.5 as UM -import Cura 1.0 as Cura +import Cura 1.5 as Cura SettingItem { id: base property var focusItem: control - contents: ComboBox + contents: Cura.ComboBox { id: control anchors.fill: parent @@ -113,7 +113,7 @@ SettingItem color: UM.Theme.getColor("setting_control_button"); } - background: Rectangle + background: UM.UnderlineBackground { color: { @@ -127,9 +127,7 @@ SettingItem } return UM.Theme.getColor("setting_control") } - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: + liningColor: { if (!enabled) { @@ -137,9 +135,9 @@ SettingItem } if (control.hovered || control.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("border_main_light") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("border_field_light") } } diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 1f4a021009..5cde1c0ae9 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -5,7 +5,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import UM 1.5 as UM -import Cura 1.0 as Cura +import Cura 1.5 as Cura SettingItem { @@ -19,7 +19,7 @@ SettingItem // this extra property to keep the ExtrudersModel and use this in the rest of the code. property var extrudersWithOptionalModel: CuraApplication.getExtrudersModelWithOptional() - contents: ComboBox + contents: Cura.ComboBox { id: control anchors.fill: parent @@ -111,26 +111,24 @@ SettingItem sourceSize.width: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor - color: UM.Theme.getColor("setting_control_button"); + color: UM.Theme.getColor("setting_control_button") } - background: Rectangle + background: UM.UnderlineBackground { color: { if (!enabled) { - return UM.Theme.getColor("setting_control_disabled"); + return UM.Theme.getColor("setting_control_disabled") } - if (control.hovered || control.activeFocus) + if (control.hovered || base.activeFocus) { - return UM.Theme.getColor("setting_control_highlight"); + return UM.Theme.getColor("setting_control_highlight") } - return UM.Theme.getColor("setting_control"); + return UM.Theme.getColor("setting_control") } - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: + liningColor: { if (!enabled) { @@ -138,9 +136,9 @@ SettingItem } if (control.hovered || control.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("border_main_light") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("border_field_light") } } @@ -214,7 +212,7 @@ SettingItem if (model.enabled) { UM.Theme.getColor("setting_control_text") } else { - UM.Theme.getColor("action_button_disabled_text"); + UM.Theme.getColor("action_button_disabled_text") } } elide: Text.ElideRight diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index a0ac828b20..31803bbddb 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -118,15 +118,13 @@ "scrollbar_handle_hover": [255, 255, 255, 255], "scrollbar_handle_down": [255, 255, 255, 255], - "setting_category": [75, 80, 83, 255], + "setting_category": "background_3", "setting_category_disabled": [75, 80, 83, 255], - "setting_category_hover": [75, 80, 83, 255], + "setting_category_hover": "background_3", "setting_category_text": [255, 255, 255, 152], "setting_category_disabled_text": [255, 255, 255, 101], "setting_category_active_text": [255, 255, 255, 204], - "setting_control": [43, 48, 52, 255], - "setting_control_highlight": [43, 48, 52, 255], "setting_control": "background_2", "setting_control_selected": [34, 39, 42, 38], "setting_control_highlight": "background_2", From a3a5b613aeabc90e0eaa63430b46ac217c049a2c Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 12:09:27 +0100 Subject: [PATCH 66/79] Style menu bar according to theme CURA-8688 --- resources/qml/MainWindow/ApplicationMenu.qml | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 0345e6dda5..6792690328 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -21,7 +21,27 @@ Item id: applicationMenu width: parent.width height: UM.Theme.getSize("context_menu").height - background: Rectangle {} + + background: Rectangle { + color: UM.Theme.getColor("background_1") + } + + delegate: MenuBarItem + { + id: menuBarItem + + contentItem: UM.Label + { + text: menuBarItem.text + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + } + + background: Rectangle + { + color: menuBarItem.highlighted ? UM.Theme.getColor("background_2") : "transparent" + } + } FileMenu {} EditMenu {} From 862525bc9024b1018302a4ea9523a37e503b4638 Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 12:29:09 +0100 Subject: [PATCH 67/79] Remove obsolete uses of system palette CURA-8688 --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 2 -- resources/qml/Preferences/ProfilesPage.qml | 5 ----- resources/qml/Preferences/SettingVisibilityPage.qml | 1 - 3 files changed, 8 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 94016636db..03e1da7d35 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -425,8 +425,6 @@ Item storeIndex: 0 } - SystemPalette { id: palette } - Component { id: settingTextField diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index d6522829fe..dcf02bc738 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -293,11 +293,6 @@ UM.ManagementPage } } - SystemPalette - { - id: palette - } - Column { id: detailsPanelHeaderColumn diff --git a/resources/qml/Preferences/SettingVisibilityPage.qml b/resources/qml/Preferences/SettingVisibilityPage.qml index 1e2ab6a365..d8ad58e680 100644 --- a/resources/qml/Preferences/SettingVisibilityPage.qml +++ b/resources/qml/Preferences/SettingVisibilityPage.qml @@ -189,7 +189,6 @@ UM.PreferencesPage } UM.I18nCatalog { name: "cura" } - SystemPalette { id: palette } Component { From ac907ca4518dc34c7c452f384ad8ef081e6a2320 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 12:33:19 +0100 Subject: [PATCH 68/79] Update highlight colors CURA-8688 --- resources/qml/ExpandableComponent.qml | 4 ++-- resources/qml/ExpandableComponentHeader.qml | 3 +-- resources/qml/ExpandablePopup.qml | 4 ++-- resources/themes/cura-dark/theme.json | 3 +++ resources/themes/cura-light/theme.json | 3 +++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index 8821bcbb98..e5eab3bd93 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -30,8 +30,8 @@ Item property color contentBackgroundColor: UM.Theme.getColor("action_button") property color headerBackgroundColor: UM.Theme.getColor("action_button") - property color headerActiveColor: UM.Theme.getColor("secondary") - property color headerHoverColor: UM.Theme.getColor("action_button_hovered") + property color headerActiveColor: UM.Theme.getColor("expandable_active") + property color headerHoverColor: UM.Theme.getColor("expandable_hover") property alias enabled: mouseArea.enabled diff --git a/resources/qml/ExpandableComponentHeader.qml b/resources/qml/ExpandableComponentHeader.qml index 831267acbe..7176f0978b 100644 --- a/resources/qml/ExpandableComponentHeader.qml +++ b/resources/qml/ExpandableComponentHeader.qml @@ -16,7 +16,7 @@ Cura.RoundedRectangle property alias xPosCloseButton: closeButton.left height: UM.Theme.getSize("expandable_component_content_header").height - color: UM.Theme.getColor("secondary") + color: UM.Theme.getColor("background_1") cornerSide: Cura.RoundedRectangle.Direction.Up border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") @@ -27,7 +27,6 @@ Cura.RoundedRectangle id: headerLabel text: "" font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("small_button_text") height: parent.height anchors diff --git a/resources/qml/ExpandablePopup.qml b/resources/qml/ExpandablePopup.qml index 4e9393b086..219608a762 100644 --- a/resources/qml/ExpandablePopup.qml +++ b/resources/qml/ExpandablePopup.qml @@ -30,8 +30,8 @@ Item property color contentBackgroundColor: UM.Theme.getColor("action_button") property color headerBackgroundColor: UM.Theme.getColor("action_button") - property color headerActiveColor: UM.Theme.getColor("secondary") - property color headerHoverColor: UM.Theme.getColor("action_button_hovered") + property color headerActiveColor: UM.Theme.getColor("expandable_active") + property color headerHoverColor: UM.Theme.getColor("expandable_hover") property alias mouseArea: headerMouseArea property alias enabled: headerMouseArea.enabled diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 31803bbddb..c111ccf350 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -39,6 +39,9 @@ "primary_text": "text_default", "secondary": [95, 95, 95, 255], + "expandable_active": "background_2", + "expandable_hover": "background_2", + "secondary_button": "background_1", "secondary_button_hover": "background_3", "secondary_button_text": [255, 255, 255, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index e01c0363fa..a959a17d0c 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -208,6 +208,9 @@ "border_field": [180, 180, 180, 255], "secondary": [240, 240, 240, 255], + "expandable_active": [240, 240, 240, 255], + "expandable_hover": [232, 242, 252, 255], + "icon": [8, 7, 63, 255], "primary_button": "accent_1", From 071ddfb2b14a28bed8d3d61d974c6ec7eb4b2c34 Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 12:38:54 +0100 Subject: [PATCH 69/79] Fix text elide/word wrap issue in monitor page The print job name wasn't elided causing the text to overflow the progress bar card. CURA-8688 --- plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index e3da51f966..df701b1d1f 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -392,6 +392,7 @@ Item id: printerJobNameLabel color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") elide: Text.ElideRight + wrapMode: Text.NoWrap font: UM.Theme.getFont("large") // 16pt, bold text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled") width: parent.width From fc3f0a4ad389ca17bafd55cd4677ba0b654b9369 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 12:44:52 +0100 Subject: [PATCH 70/79] Update setting profile combobox to new style CURA-8688 --- .../qml/PrintSetupSelector/Custom/CustomPrintSetup.qml | 7 ++----- resources/themes/cura-dark/theme.json | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index 94d55d563d..440c9e4e78 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -126,13 +126,10 @@ Item } } - background: Rectangle + background: UM.UnderlineBackground { id: backgroundItem - border.color: intentSelection.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") - border.width: UM.Theme.getSize("default_lining").width - radius: UM.Theme.getSize("default_radius").width - color: UM.Theme.getColor("main_background") + liningColor: intentSelection.hovered ? UM.Theme.getColor("border_main_light") : UM.Theme.getColor("border_field_light") } UM.SimpleButton diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index c111ccf350..106290c71f 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -28,7 +28,7 @@ "colors": { "main_background": "background_1", - "detail_background": [63, 63, 63, 255], + "detail_background": "background_2", "message_background": "background_1", "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], From ef5fced686fcd94fb44af5f049ad9002c948db4a Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 12:51:55 +0100 Subject: [PATCH 71/79] adjust setting valid background color CURA-8688 --- resources/themes/cura-light/theme.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index a959a17d0c..405d40f070 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -293,8 +293,8 @@ "setting_category_disabled_text": [24, 41, 77, 101], "setting_category_active_text": [35, 35, 35, 255], - "setting_control": [255, 255, 255, 255], - "setting_control_highlight": [255, 255, 255, 255], + "setting_control": "background_2", + "setting_control_highlight": "background_2", "setting_control_border": [199, 199, 199, 255], "setting_control_border_highlight": [50, 130, 255, 255], "setting_control_text": [35, 35, 35, 255], @@ -308,7 +308,7 @@ "setting_validation_error": [127, 127, 127, 255], "setting_validation_warning_background": [255, 145, 62, 255], "setting_validation_warning": [127, 127, 127, 255], - "setting_validation_ok": [255, 255, 255, 255], + "setting_validation_ok": "background_2", "material_compatibility_warning": [243, 166, 59, 255], From 4ea93c5939729d9c15ef0bfa92a091987122c95f Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 1 Mar 2022 13:12:35 +0100 Subject: [PATCH 72/79] Fix text rendering issue in the menu bar To denote the hotkey assigned with each menu item an ampersand is used in the configuration. This ampersand was previously rendered directly to the screen due to the `UM.Label`. This is now correctly replaced by an underline. CURA-8688 --- resources/qml/MainWindow/ApplicationMenu.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 6792690328..bf3781331a 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -32,7 +32,10 @@ Item contentItem: UM.Label { - text: menuBarItem.text + text: menuBarItem.text.replace(new RegExp("&([A-Za-z])"), function (match, character) + { + return `${character}`; + }) horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } From 2e92a986db1f20a943fc1006d84a7fcb96b7aef8 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 13:13:54 +0100 Subject: [PATCH 73/79] adjust dropdown background hover color CURA-8688 --- resources/qml/Settings/SettingExtruder.qml | 1 - resources/qml/Settings/SettingOptionalExtruder.qml | 1 - resources/qml/Widgets/ComboBox.qml | 1 - resources/themes/cura-dark/theme.json | 2 +- resources/themes/cura-light/theme.json | 2 +- 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index d3a50a7eb3..6b2ac55066 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -225,7 +225,6 @@ SettingItem background: Rectangle { color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" } } } diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 5cde1c0ae9..1ac7afe967 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -235,7 +235,6 @@ SettingItem background: Rectangle { color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" } } } diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index a9e48e5a60..f84772e609 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -146,7 +146,6 @@ ComboBox Rectangle { color: delegateItem.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: delegateItem.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" anchors.fill: parent } text: delegateLabel.truncated ? delegateItem.text : "" diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 106290c71f..d877e3f788 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -130,7 +130,7 @@ "setting_control": "background_2", "setting_control_selected": [34, 39, 42, 38], - "setting_control_highlight": "background_2", + "setting_control_highlight": "background_3", "setting_control_border": [255, 255, 255, 38], "setting_control_border_highlight": [12, 169, 227, 255], "setting_control_text": "text_default", diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 405d40f070..09edaf6a57 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -294,7 +294,7 @@ "setting_category_active_text": [35, 35, 35, 255], "setting_control": "background_2", - "setting_control_highlight": "background_2", + "setting_control_highlight": "background_3", "setting_control_border": [199, 199, 199, 255], "setting_control_border_highlight": [50, 130, 255, 255], "setting_control_text": [35, 35, 35, 255], From 6ad3ef8e7d687955fa45522c96dc94427dcc14e1 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 13:22:51 +0100 Subject: [PATCH 74/79] Update monitor page background colors CURA-8688 --- resources/themes/cura-dark/theme.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index d877e3f788..6e222e1c32 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -193,8 +193,8 @@ "monitor_card_background": [51, 53, 54, 255], "monitor_card_hover": [84, 89, 95, 255], - "monitor_stage_background": [30, 36, 39, 255], - "monitor_stage_background_fade": [30, 36, 39, 102], + "monitor_stage_background": "background_1", + "monitor_stage_background_fade": "background_1", "monitor_progress_bar_deactive": [102, 102, 102, 255], "monitor_progress_bar_empty": [67, 67, 67, 255], From 1b6c3516bd0bbf8bff612f68f35981eccccbac93 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 14:37:48 +0100 Subject: [PATCH 75/79] Set default overlay background to background_1 CURA-8688 --- resources/themes/cura-dark/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 6e222e1c32..91d742a83b 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -33,7 +33,7 @@ "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], "lining": "border_main", - "viewport_overlay": [30, 36, 39, 255], + "viewport_overlay": "background_1", "primary": [12, 169, 227, 255], "primary_text": "text_default", From 5dfc5971e369367c354ada305d550e854ce7201a Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Tue, 1 Mar 2022 14:53:51 +0100 Subject: [PATCH 76/79] Dialogs inheriting from incorrect Component, causing the buttons to be styled incorrectly CURA-8688 --- resources/qml/Preferences/MachinesPage.qml | 2 +- resources/qml/Preferences/RenameDialog.qml | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index e51fce09f0..b1a5d7f19b 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -125,7 +125,7 @@ UM.ManagementPage } } - UM.RenameDialog + Cura.RenameDialog { id: renameDialog object: base.currentItem && base.currentItem.name ? base.currentItem.name : "" diff --git a/resources/qml/Preferences/RenameDialog.qml b/resources/qml/Preferences/RenameDialog.qml index 7bf02e92a1..6e4c628114 100644 --- a/resources/qml/Preferences/RenameDialog.qml +++ b/resources/qml/Preferences/RenameDialog.qml @@ -11,6 +11,9 @@ import Cura 1.0 as Cura UM.Dialog { id: base + + buttonSpacing: UM.Theme.getSize("default_margin").width + property string object: "" property alias newName: nameField.text @@ -64,14 +67,6 @@ UM.Dialog } } - Item - { - ButtonGroup { - buttons: [cancelButton, okButton] - checkedButton: okButton - } - } - rightButtons: [ Cura.SecondaryButton { From b2bed4efdd56de19a9979cc94e61211b6ae5f38a Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 2 Mar 2022 09:06:47 +0100 Subject: [PATCH 77/79] Fix setting visibility styling working in one theme and not the other. CURA-8688 --- plugins/DigitalLibrary/resources/qml/Table.qml | 3 ++- plugins/PerObjectSettingsTool/PerObjectCategory.qml | 8 ++++---- resources/themes/cura-dark/theme.json | 2 ++ resources/themes/cura-light/theme.json | 2 ++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/DigitalLibrary/resources/qml/Table.qml b/plugins/DigitalLibrary/resources/qml/Table.qml index 0f539675a0..c4aafc1ce4 100644 --- a/plugins/DigitalLibrary/resources/qml/Table.qml +++ b/plugins/DigitalLibrary/resources/qml/Table.qml @@ -35,7 +35,8 @@ Item model: columnHeaders Rectangle { - width: Math.max(1, Math.round(tableBase.width / headerRepeater.count)) + //minimumWidth: Math.max(1, Math.round(tableBase.width / headerRepeater.count)) + width: 300 height: UM.Theme.getSize("section").height color: UM.Theme.getColor("secondary") diff --git a/plugins/PerObjectSettingsTool/PerObjectCategory.qml b/plugins/PerObjectSettingsTool/PerObjectCategory.qml index 2a0f028d1c..3d0b1d826e 100644 --- a/plugins/PerObjectSettingsTool/PerObjectCategory.qml +++ b/plugins/PerObjectSettingsTool/PerObjectCategory.qml @@ -12,7 +12,7 @@ Button { id: base; background: Rectangle { - color: UM.Theme.getColor("background_3") + color: UM.Theme.getColor("category_background") } contentItem: Row @@ -31,7 +31,7 @@ Button { height: (label.height / 2) | 0 width: height 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") + color: base.hovered ? UM.Theme.getColor("primary_button_hover"): UM.Theme.getColor("text") } } UM.RecolorImage @@ -40,14 +40,14 @@ Button { height: label.height width: height source: UM.Theme.getIcon(definition.icon) - color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("primary_button_text") + color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("text") } UM.Label { id: label anchors.verticalCenter: parent.verticalCenter text: base.text - color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("primary_button_text") + color: base.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("text") font.bold: true } } diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 91d742a83b..8f45471344 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -164,6 +164,8 @@ "checkbox_text": "text_default", "checkbox_disabled": "background_2", + "category_background": "background_3", + "tooltip": "background_2", "tooltip_text": "text_default", diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 09edaf6a57..ba18e5d0d2 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -332,6 +332,8 @@ "checkbox_disabled": "background_2", "checkbox_text": [0, 12, 26, 255], + "category_background": "background_2", + "tooltip": [25, 25, 25, 255], "tooltip_text": [255, 255, 255, 255], From 50ac2eacc43110c26f2f7169d712880edc486371 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 2 Mar 2022 10:26:09 +0100 Subject: [PATCH 78/79] Fix property binding loop for height which was causing crashes when moving list items quickly up and down the list. CURA-8688 --- plugins/PostProcessingPlugin/PostProcessingPlugin.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index a095ccb352..9c59f9e879 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -116,7 +116,6 @@ UM.Dialog RowLayout { anchors.fill: parent - height: childrenRect.height UM.Label { From 30083c13d34e4a7d609a258ec3108b862a5551aa Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Wed, 2 Mar 2022 11:34:03 +0100 Subject: [PATCH 79/79] Swap implicit width/height for preferredWidth/Height to avoid binding loop error CURA-8688 --- plugins/Marketplace/resources/qml/Marketplace.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Marketplace/resources/qml/Marketplace.qml b/plugins/Marketplace/resources/qml/Marketplace.qml index 5a30141b32..8fcba852bd 100644 --- a/plugins/Marketplace/resources/qml/Marketplace.qml +++ b/plugins/Marketplace/resources/qml/Marketplace.qml @@ -64,8 +64,8 @@ Window // Page title. Item { - implicitWidth: parent.width - implicitHeight: childrenRect.height + UM.Theme.getSize("default_margin").height + Layout.preferredWidth: parent.width + Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height Label {