From 437636d103b96157af713d7280e3bcfb0263c476 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 24 Nov 2015 15:14:52 +0100 Subject: [PATCH] Restyle advanced settings category headers --- resources/themes/cura/styles.qml | 20 +++++++++++++++++++- resources/themes/cura/theme.json | 5 +++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index d1520f318d..523a2410e3 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -307,6 +307,24 @@ QtObject { } } Behavior on color { ColorAnimation { duration: 50; } } + Rectangle { + height: UM.Theme.sizes.default_lining.height + width: parent.width + anchors.bottom: parent.bottom + color: { + if(!control.enabled) { + return UM.Theme.colors.setting_category_disabled_border; + } else if(control.hovered && control.checkable && control.checked) { + return UM.Theme.colors.setting_category_active_hover_border; + } else if(control.pressed || (control.checkable && control.checked)) { + return UM.Theme.colors.setting_category_active_border; + } else if(control.hovered) { + return UM.Theme.colors.setting_category_hover_border; + } else { + return UM.Theme.colors.setting_category_border; + } + } + } } label: Item { anchors.fill: parent; @@ -350,7 +368,7 @@ QtObject { sourceSize.width: width sourceSize.height: width color: UM.Theme.colors.setting_category_text - source: control.checked ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_right + source: control.checked ? UM.Theme.icons.arrow_bottom : UM.Theme.icons.arrow_left } } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 3e52fe0427..6fedd57fbe 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -111,6 +111,11 @@ "setting_category_active": [255, 255, 255, 255], "setting_category_active_hover": [245, 245, 245, 255], "setting_category_text": [24, 41, 77, 255], + "setting_category_border": [127, 127, 127, 255], + "setting_category_disabled_border": [127, 127, 127, 255], + "setting_category_hover_border": [12, 159, 227, 255], + "setting_category_active_border": [245, 245, 245, 255], + "setting_category_active_hover_border": [12, 159, 227, 255], "setting_control": [255, 255, 255, 255], "setting_control_selected": [24, 41, 77, 255],