From 29edcb905866593d9d1966f801e3276a1d8151e1 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 8 Sep 2016 08:48:58 +0200 Subject: [PATCH] Style MessageStack making messages less likely to be overlooked CURA-1886 --- resources/themes/cura/styles.qml | 22 ++++++++++++++++++---- resources/themes/cura/theme.json | 14 +++++++++++--- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 3cfb4514ee..91a512b6db 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -199,18 +199,32 @@ QtObject { property Component progressbar: Component{ ProgressBarStyle { - background:Rectangle { + background: Rectangle { implicitWidth: Theme.getSize("message").width - (Theme.getSize("default_margin").width * 2) implicitHeight: Theme.getSize("progressbar").height radius: Theme.getSize("progressbar_radius").width - color: Theme.getColor("progressbar_background") + color: control.hasOwnProperty("backgroundColor") ? control.backgroundColor : Theme.getColor("progressbar_background") } progress: Rectangle { - color: control.indeterminate ? "transparent" : Theme.getColor("progressbar_control") + color: + { + if(control.indeterminate) + { + return "transparent"; + } + else if(control.hasOwnProperty("controlColor")) + { + return control.controlColor; + } + else + { + return Theme.getColor("progressbar_control"); + } + } radius: Theme.getSize("progressbar_radius").width Rectangle{ radius: Theme.getSize("progressbar_radius").width - color: Theme.getColor("progressbar_control") + color: control.hasOwnProperty("controlColor") ? control.controlColor : Theme.getColor("progressbar_control") width: Theme.getSize("progressbar_control").width height: Theme.getSize("progressbar_control").height visible: control.indeterminate diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 69fc2c2c71..f90467c9e8 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -159,9 +159,17 @@ "tooltip": [12, 169, 227, 255], "tooltip_text": [255, 255, 255, 255], - "message_background": [255, 255, 255, 255], - "message_text": [32, 166, 219, 255], - "message_dismiss": [127, 127, 127, 255], + "message_background": [24, 41, 77, 255], + "message_text": [255, 255, 255, 255], + "message_border": [24, 41, 77, 255], + "message_button": [255, 255, 255, 255], + "message_button_hover": [12, 169, 227, 255], + "message_button_active": [32, 166, 219, 255], + "message_button_text": [24, 41, 77, 255], + "message_button_text_hover": [255, 255, 255, 255], + "message_button_text_active": [255, 255, 255, 255], + "message_progressbar_background": [255, 255, 255, 255], + "message_progressbar_control": [12, 169, 227, 255], "tool_panel_background": [255, 255, 255, 255],