From 0a214b2c47dbfee93ea257bb5306020c64195aa1 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 28 Feb 2022 11:41:21 +0100 Subject: [PATCH 01/12] 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 8d3a5ac7e4a3c63881d75f6cbd64ee8e6bab7387 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 28 Feb 2022 11:47:10 +0100 Subject: [PATCH 02/12] 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 6159ccbdc791f628260d416f56cc0076c8fff824 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 28 Feb 2022 12:20:46 +0100 Subject: [PATCH 03/12] 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 04/12] 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 05/12] 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 06/12] 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 07/12] 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 08/12] 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 09/12] 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 10/12] 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 11/12] 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 12/12] 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)