From c11c80fa2461ea07925770cd1e437cf6fd043473 Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Mon, 15 Jun 2015 16:44:43 +0200 Subject: [PATCH] Defines the style of the progressbar Commits to #44 --- resources/themes/cura/styles.qml | 43 ++++++++++++++++++++++++++++++++ resources/themes/cura/theme.json | 7 ++++++ 2 files changed, 50 insertions(+) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 3c2a392b8d..43bbb8c400 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -151,6 +151,49 @@ QtObject { } } + + property Component progressbar: Component{ + ProgressBarStyle { + background: UM.AngledCornerRectangle { + anchors.fill: parent + anchors.left: parent.left + implicitWidth: UM.Theme.sizes.progressbar.width + implicitHeight: UM.Theme.sizes.progressbar.height + color: "transparent" + } + progress: UM.AngledCornerRectangle { + anchors.left: parent.left + anchors.fill: parent + cornerSize: UM.Theme.sizes.progressbar_control.height + color: UM.Theme.colors.progressbar_background + Item { + anchors.fill: parent + anchors.margins: UM.Theme.sizes.progressbar_margin.width + visible: control.indeterminate + Row { + Repeater { + UM.AngledCornerRectangle { + cornerSize: UM.Theme.sizes.progressbar_control.height + color: UM.Theme.colors.progressbar_control + width: UM.Theme.sizes.progressbar_control.width + height: UM.Theme.sizes.progressbar_control.height + } + model: 1 + } + SequentialAnimation on x { + id: xAnim + property int animEndPoint: UM.Theme.sizes.progressbar.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;} + } + } + } + } + } + } + property Component sidebar_category: Component { ButtonStyle { background: UM.AngledCornerRectangle { diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 9e5911e4e0..222b3008fe 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -88,6 +88,9 @@ "setting_validation_warning": [255, 186, 15, 255], "setting_validation_ok": [255, 255, 255, 255], + "progressbar_background": [245, 245, 245, 255], + "progressbar_control": [12, 169, 227, 255], + "slider_groove": [245, 245, 245, 255], "slider_groove_border": [205, 202, 201, 255], "slider_groove_fill": [205, 202, 201, 255], @@ -135,6 +138,10 @@ "button": [4.25, 4.25], "button_icon": [2.9, 2.9], + "progressbar": [26.0, 0.5], + "progressbar_control": [8.0, 0.5], + "progressbar_margin": [0.0, 0.0], + "scrollbar": [0.5, 0.5], "slider_groove": [0.5, 0.5],