From 3f60bc9287501df4f89bfade395f60d3f854316f Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Tue, 12 Sep 2017 11:59:21 +0200 Subject: [PATCH] Cleanup combobox styling --- resources/themes/cura-light/styles.qml | 23 ++++++----------------- resources/themes/cura-light/theme.json | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 8f2131bbfb..049c2b547c 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -614,7 +614,7 @@ QtObject { implicitHeight: Theme.getSize("setting_control").height; implicitWidth: Theme.getSize("setting_control").width; - color: Theme.getColor("setting_control") + color: (control.hovered || controler._hovered) ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control") Behavior on color { ColorAnimation { duration: 50; } } border.width: Theme.getSize("default_lining").width; @@ -660,24 +660,11 @@ QtObject { { background: Rectangle { - color: - { - if(!enabled) - { - return UM.Theme.getColor("setting_control_disabled"); - } - if(control.hovered) - { - return UM.Theme.getColor("setting_control_highlight"); - } - else - { - return UM.Theme.getColor("setting_control"); - } - } + color: !enabled ? UM.Theme.getColor("setting_control_disabled") : (control.hovered || controler._hovered) ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control") border.width: UM.Theme.getSize("default_lining").width - border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : control.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") + border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : (control.hovered || control._hovered) ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") } + label: Item { Label @@ -695,6 +682,7 @@ QtObject { elide: Text.ElideRight verticalAlignment: Text.AlignVCenter } + Rectangle { id: swatch @@ -714,6 +702,7 @@ QtObject { color: if (control.color_override != "") {return control.color_override} else {return control.color;} } + UM.RecolorImage { id: downArrow diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index b00050c14c..c8cd70ff2f 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -166,7 +166,7 @@ "setting_control": [255, 255, 255, 255], "setting_control_selected": [24, 41, 77, 255], - "setting_control_highlight": [255, 255, 255, 0], + "setting_control_highlight": [255, 255, 255, 255], "setting_control_border": [127, 127, 127, 255], "setting_control_border_highlight": [12, 169, 227, 255], "setting_control_text": [27, 27, 27, 255],