From bf3d3d46e2e20efb1c59ecc18f66f6e6cf7af1eb Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 23 Jan 2017 23:38:48 +0100 Subject: [PATCH 1/3] Fix Rectangles that always show as white regardless of the theme --- plugins/LayerView/LayerView.qml | 5 +++-- resources/qml/MonitorButton.qml | 3 ++- resources/qml/SaveButton.qml | 3 +++ resources/qml/SidebarHeader.qml | 1 + resources/qml/SidebarSimple.qml | 3 +++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index fef0c52c12..82728d2a1e 100644 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -41,8 +41,9 @@ Item width: valueLabel.width + UM.Theme.getSize("default_margin").width Behavior on height { NumberAnimation { duration: 50; } } - border.width: UM.Theme.getSize("default_lining").width; - border.color: UM.Theme.getColor("slider_groove_border"); + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("slider_groove_border") + color: UM.Theme.getColor("tool_panel_background") visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 4a68e532d1..f61a527429 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -15,12 +15,13 @@ Rectangle id: base; UM.I18nCatalog { id: catalog; name:"cura"} + color: "transparent" + property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0 property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands property real progress: printerConnected ? Cura.MachineManager.printerOutputDevices[0].progress : 0 property int backendState: UM.Backend.state - property bool showProgress: { // determine if we need to show the progress bar + percentage if(!printerConnected || !printerAcceptsCommands) { diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 323123e9a7..13849deb4a 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -12,6 +12,8 @@ Rectangle { id: base; UM.I18nCatalog { id: catalog; name:"cura"} + color: "transparent" + property real progress: UM.Backend.progress; property int backendState: UM.Backend.state; property bool activity: Printer.getPlatformActivity; @@ -80,6 +82,7 @@ Rectangle { anchors.top: progressBar.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left + color: "transparent" Row { id: additionalComponentsRow diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 3a87d51dcf..2a370d1a89 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -207,6 +207,7 @@ Column width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height + color: "transparent" ToolButton { id: variantSelection diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index e40e114e0e..d9520c4b06 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -32,6 +32,7 @@ Item anchors.left: parent.left width: base.width * .45 - UM.Theme.getSize("default_margin").width height: childrenRect.height + color: "transparent" Label { @@ -224,6 +225,7 @@ Item anchors.left: parent.left anchors.right: parent.right height: childrenRect.height + color: "transparent" Label { @@ -469,6 +471,7 @@ Item anchors.left: parent.left width: parent.width height: childrenRect.height + color: "transparent" Label { From a823980d17c70bbdcc3949c980568d36a8ae32f3 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 Jan 2017 15:21:37 +0100 Subject: [PATCH 2/3] Replace "transparent" Rectangles by Items --- plugins/ImageReader/ConfigUI.qml | 5 ++--- resources/qml/AddMachineDialog.qml | 4 +--- resources/qml/JobSpecs.qml | 6 ++---- resources/qml/Legend.qml | 3 +-- resources/qml/MonitorButton.qml | 4 +--- resources/qml/SaveButton.qml | 11 ++++------- resources/qml/SidebarHeader.qml | 3 +-- resources/qml/SidebarSimple.qml | 9 +++------ 8 files changed, 15 insertions(+), 30 deletions(-) diff --git a/plugins/ImageReader/ConfigUI.qml b/plugins/ImageReader/ConfigUI.qml index 893f8e248c..65374702ab 100644 --- a/plugins/ImageReader/ConfigUI.qml +++ b/plugins/ImageReader/ConfigUI.qml @@ -156,11 +156,10 @@ UM.Dialog anchors.verticalCenter: parent.verticalCenter } - Rectangle { + Item { width: 180 height: 20 - Layout.fillWidth:true - color: "transparent" + Layout.fillWidth: true Slider { id: smoothing diff --git a/resources/qml/AddMachineDialog.qml b/resources/qml/AddMachineDialog.qml index 8a97a23bb3..756badc4d2 100644 --- a/resources/qml/AddMachineDialog.qml +++ b/resources/qml/AddMachineDialog.qml @@ -74,10 +74,8 @@ UM.Dialog width: machineList.width style: ButtonStyle { - background: Rectangle + background: Item { - border.width: 0 - color: "transparent"; height: UM.Theme.getSize("standard_list_lineheight").height width: machineList.width } diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 00d22ae8a8..70c306f1bc 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -9,7 +9,7 @@ import QtQuick.Layouts 1.1 import UM 1.1 as UM import Cura 1.0 as Cura -Rectangle { +Item { id: base property bool activity: Printer.getPlatformActivity @@ -29,7 +29,6 @@ Rectangle { property variant printMaterialCosts: PrintInformation.materialCosts height: childrenRect.height - color: "transparent" Connections { @@ -84,9 +83,8 @@ Rectangle { } style: ButtonStyle { - background: Rectangle + background: Item { - color: "transparent" UM.RecolorImage { width: UM.Theme.getSize("save_button_specs_icons").width; diff --git a/resources/qml/Legend.qml b/resources/qml/Legend.qml index 353747ef67..94eeb1e903 100644 --- a/resources/qml/Legend.qml +++ b/resources/qml/Legend.qml @@ -9,14 +9,13 @@ import QtQuick.Layouts 1.1 import UM 1.1 as UM import Cura 1.0 as Cura -Rectangle { +Item { id: base UM.I18nCatalog { id: catalog; name:"cura"} width: childrenRect.width height: childrenRect.height - color: "transparent" Connections { diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index f61a527429..1b8f36b264 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -10,13 +10,11 @@ import QtQuick.Layouts 1.1 import UM 1.1 as UM import Cura 1.0 as Cura -Rectangle +Item { id: base; UM.I18nCatalog { id: catalog; name:"cura"} - color: "transparent" - property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0 property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands property real progress: printerConnected ? Cura.MachineManager.printerOutputDevices[0].progress : 0 diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 13849deb4a..2b435aad1b 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -8,12 +8,10 @@ import QtQuick.Layouts 1.1 import UM 1.1 as UM -Rectangle { +Item { id: base; UM.I18nCatalog { id: catalog; name:"cura"} - color: "transparent" - property real progress: UM.Backend.progress; property int backendState: UM.Backend.state; property bool activity: Printer.getPlatformActivity; @@ -55,7 +53,7 @@ Rectangle { text: statusText; } - Rectangle{ + Rectangle { id: progressBar width: parent.width - 2 * UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("progressbar").height @@ -66,7 +64,7 @@ Rectangle { radius: UM.Theme.getSize("progressbar_radius").width color: UM.Theme.getColor("progressbar_background") - Rectangle{ + Rectangle { width: Math.max(parent.width * base.progress) height: parent.height color: UM.Theme.getColor("progressbar_control") @@ -75,14 +73,13 @@ Rectangle { } } - Rectangle{ + Item { id: saveRow width: base.width height: saveToButton.height anchors.top: progressBar.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.left: parent.left - color: "transparent" Row { id: additionalComponentsRow diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 2a370d1a89..93d4e9d6f2 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -201,13 +201,12 @@ Column color: UM.Theme.getColor("text"); } - Rectangle + Item { anchors.verticalCenter: parent.verticalCenter width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height - color: "transparent" ToolButton { id: variantSelection diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index d9520c4b06..61cc23d403 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -25,14 +25,13 @@ Item Component.onDestruction: PrintInformation.enabled = false UM.I18nCatalog { id: catalog; name:"cura"} - Rectangle + Item { id: infillCellLeft anchors.top: parent.top anchors.left: parent.left width: base.width * .45 - UM.Theme.getSize("default_margin").width height: childrenRect.height - color: "transparent" Label { @@ -217,7 +216,7 @@ Item } } - Rectangle + Item { id: helpersCell anchors.top: infillCellRight.bottom @@ -225,7 +224,6 @@ Item anchors.left: parent.left anchors.right: parent.right height: childrenRect.height - color: "transparent" Label { @@ -463,7 +461,7 @@ Item supportExtruderCombobox.updateCurrentColor(); } - Rectangle + Item { id: tipsCell anchors.top: helpersCell.bottom @@ -471,7 +469,6 @@ Item anchors.left: parent.left width: parent.width height: childrenRect.height - color: "transparent" Label { From 4a3329bc6cdd100f7539147b5c620d23a04f9e33 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 25 Jan 2017 15:25:14 +0100 Subject: [PATCH 3/3] Remove background from setting buttons (revert, override notice, linked) The background now reverts to "transparent". These icon buttons are outside the setting control, so they should not have the background of the control itself. --- resources/qml/Settings/SettingItem.qml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 7b50809baa..65e8b7e1c1 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -145,8 +145,6 @@ Item { height: parent.height; width: height; - backgroundColor: UM.Theme.getColor("setting_control"); - hoverBackgroundColor: UM.Theme.getColor("setting_control") color: UM.Theme.getColor("setting_control_button") hoverColor: UM.Theme.getColor("setting_control_button") @@ -173,8 +171,6 @@ Item { height: parent.height; width: height; - backgroundColor: UM.Theme.getColor("setting_control"); - hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") color: UM.Theme.getColor("setting_control_button") hoverColor: UM.Theme.getColor("setting_control_button_hover") @@ -278,8 +274,6 @@ Item { } } - backgroundColor: UM.Theme.getColor("setting_control"); - hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight") color: UM.Theme.getColor("setting_control_button") hoverColor: UM.Theme.getColor("setting_control_button_hover")