From 720577ff8eb43df2dded5d49f3cb50658f82fcfe Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Fri, 21 Aug 2015 10:54:39 +0200 Subject: [PATCH] 15.10 Restyling of the message stack specifically the progressbar, styling of the messages and colors Contributes to: issue CURA-60 --- cura/CuraApplication.py | 5 +++++ resources/qml/Cura.qml | 1 + resources/themes/cura/styles.qml | 27 ++++++++++----------------- resources/themes/cura/theme.json | 13 +++++++------ 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 319fa60758..221362f09b 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -116,6 +116,11 @@ class CuraApplication(QtApplication): def run(self): self._i18n_catalog = i18nCatalog("cura"); + i18nCatalog.setTagReplacements({ + "filename": "font color=\"black\"", + "message": "font color=UM.Theme.colors.message_text;", + }) + self.showSplashMessage(self._i18n_catalog.i18nc("Splash screen message", "Setting up scene...")) controller = self.getController() diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 24fb33490f..1b75b8d4f9 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -214,6 +214,7 @@ UM.MainWindow { anchors { horizontalCenter: parent.horizontalCenter horizontalCenterOffset: -(UM.Theme.sizes.logo.width/ 2) + top: parent.verticalCenter; bottom: parent.bottom; } } diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index de41c44d04..0810989304 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -43,13 +43,7 @@ QtObject { Rectangle { width: parent.width height: parent.height - color: { - if(control.hovered) { - return UM.Theme.colors.load_save_button_hover - } else { - return UM.Theme.colors.load_save_button - } - } + color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button Behavior on color { ColorAnimation { duration: 50; } } } Label { @@ -208,30 +202,29 @@ QtObject { property Component progressbar: Component{ ProgressBarStyle { - background: UM.AngledCornerRectangle { - cornerSize: UM.Theme.sizes.progressbar_control.height - implicitWidth: UM.Theme.sizes.progressbar.width + background:Rectangle { + implicitWidth: UM.Theme.sizes.message.width - (UM.Theme.sizes.default_margin.width * 2) implicitHeight: UM.Theme.sizes.progressbar.height + x: UM.Theme.sizes.default_margin.width color: UM.Theme.colors.progressbar_background } - progress: UM.AngledCornerRectangle { - cornerSize: UM.Theme.sizes.progressbar_control.height + progress: Rectangle { color: control.indeterminate ? "transparent" : UM.Theme.colors.progressbar_control - UM.AngledCornerRectangle { - cornerSize: UM.Theme.sizes.progressbar_control.height + Rectangle{ color: UM.Theme.colors.progressbar_control width: UM.Theme.sizes.progressbar_control.width height: UM.Theme.sizes.progressbar_control.height + x: UM.Theme.sizes.default_margin.width visible: control.indeterminate SequentialAnimation on x { id: xAnim - property int animEndPoint: UM.Theme.sizes.progressbar.width - UM.Theme.sizes.progressbar_control.width + property int animEndPoint: UM.Theme.sizes.message.width - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.progressbar_control.width running: control.indeterminate loops: Animation.Infinite - NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;} - NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;} + NumberAnimation { from: UM.Theme.sizes.default_margin.width; to: xAnim.animEndPoint; duration: 2000;} + NumberAnimation { from: xAnim.animEndPoint; to: UM.Theme.sizes.default_margin.width; duration: 2000;} } } } diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index e85857d77a..413a653d3c 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -103,7 +103,7 @@ "setting_validation_warning": [255, 186, 15, 255], "setting_validation_ok": [255, 255, 255, 255], - "progressbar_background": [245, 245, 245, 255], + "progressbar_background": [208, 210, 211, 255], "progressbar_control": [12, 169, 227, 255], "slider_groove": [245, 245, 245, 255], @@ -131,8 +131,8 @@ "save_button_printtime_text": [12, 169, 227, 255], "save_button_background": [249, 249, 249, 255], - "message": [160, 163, 171, 255], - "message_text": [35, 35, 35, 255], + "message_background": [255, 255, 255, 255], + "message_text": [12, 169, 227, 255], "tool_panel_background": [255, 255, 255, 255] }, @@ -165,8 +165,8 @@ "button": [3.2, 3.2], "button_icon": [2.5, 2.5], - "progressbar": [26.0, 0.5], - "progressbar_control": [8.0, 0.5], + "progressbar": [26.0, 0.8], + "progressbar_control": [8.0, 0.8], "progressbar_padding": [0.0, 1.0], "scrollbar": [0.5, 0.5], @@ -193,6 +193,7 @@ "wizard_progress": [10.0, 0.0], "message": [30.0, 5.0], - "message_close": [1.25, 1.25] + "message_close": [1.25, 1.25], + "message_button": [6.0, 1.8] } }