From 9fd5ea4f9f6cd953f937425fa2715d33df7307ef Mon Sep 17 00:00:00 2001 From: Tamara Hogenhout Date: Mon, 31 Aug 2015 17:27:53 +0200 Subject: [PATCH] 15.10 restyling of the sidebar header Not yet finished Contributes to: issue CURA-60 --- resources/themes/cura/styles.qml | 58 ++++++++++++++++++-------------- resources/themes/cura/theme.json | 33 +++++++++--------- 2 files changed, 49 insertions(+), 42 deletions(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 01267eadb3..228afa3a11 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -235,7 +235,7 @@ QtObject { property Component sidebar_category: Component { ButtonStyle { - background: UM.AngledCornerRectangle { + background: Rectangle { implicitHeight: UM.Theme.sizes.section.height; color: { if(control.color) { @@ -253,37 +253,51 @@ QtObject { } } Behavior on color { ColorAnimation { duration: 50; } } - cornerSize: UM.Theme.sizes.default_margin.width; } label: Item { anchors.fill: parent; - anchors.margins: UM.Theme.sizes.default_margin.width; - - Image { + anchors.left: parent.left + Item{ id: icon; - - anchors.left: parent.left; - anchors.verticalCenter: parent.verticalCenter; - - source: control.iconSource; - width: UM.Theme.sizes.section_icon.width; - height: UM.Theme.sizes.section_icon.height; + anchors.left: parent.left + height: parent.height + width: UM.Theme.sizes.section_icon_column.width + UM.RecolorImage { + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + color: UM.Theme.colors.setting_category_text + source: control.iconSource; + width: UM.Theme.sizes.section_icon.width; + height: UM.Theme.sizes.section_icon.height; + sourceSize.width: width + 15 + sourceSize.height: width + 15 + } } Label { anchors { left: icon.right; - leftMargin: UM.Theme.sizes.default_margin.width; right: parent.right; verticalCenter: parent.verticalCenter; } - text: control.text; font: UM.Theme.fonts.setting_category; color: UM.Theme.colors.setting_category_text; fontSizeMode: Text.HorizontalFit; minimumPointSize: 8 } + UM.RecolorImage { + id: lengthIcon + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: UM.Theme.sizes.default_margin.width * 2 + width: UM.Theme.sizes.standard_arrow.width + height: UM.Theme.sizes.standard_arrow.height + sourceSize.width: width + sourceSize.height: width + color: UM.Theme.colors.setting_category_text + source: control.checked ? UM.Theme.icons.arrow_top : UM.Theme.icons.arrow_bottom + } } } } @@ -295,20 +309,15 @@ QtObject { transientScrollBars: false - scrollBarBackground: UM.AngledCornerRectangle { - implicitWidth: UM.Theme.sizes.scrollbar.width; - - cornerSize: UM.Theme.sizes.scrollbar.width; - + scrollBarBackground: Rectangle { + implicitWidth: UM.Theme.sizes.scrollbar.width color: UM.Theme.colors.scrollbar_background; } - handle: UM.AngledCornerRectangle { + handle: Rectangle { id: scrollViewHandle implicitWidth: UM.Theme.sizes.scrollbar.width; - cornerSize: UM.Theme.sizes.scrollbar.width; - color: styleData.pressed ? UM.Theme.colors.scrollbar_handle_down : styleData.hovered ? UM.Theme.colors.scrollbar_handle_hover : UM.Theme.colors.scrollbar_handle; Behavior on color { ColorAnimation { duration: 50; } } } @@ -317,14 +326,13 @@ QtObject { property variant setting_item: UM.SettingItemStyle { labelFont: UM.Theme.fonts.default; - labelColor: UM.Theme.colors.setting_label; + labelColor: UM.Theme.colors.setting_control_text; - spacing: UM.Theme.sizes.default_margin.width; + spacing: UM.Theme.sizes.default_lining.height; fixedHeight: UM.Theme.sizes.setting.height; controlWidth: UM.Theme.sizes.setting_control.width; controlRightMargin: UM.Theme.sizes.setting_control_margin.width; - controlBorderWidth: 1; controlColor: UM.Theme.colors.setting_control; controlHighlightColor: UM.Theme.colors.setting_control_highlight; controlBorderColor: UM.Theme.colors.setting_control_border; diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 919abbda6f..13514ffbc8 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -43,7 +43,7 @@ "family": "ProximaNova" }, "setting_category": { - "size": 1.5, + "size": 1.0, "family": "ProximaNova" } }, @@ -80,23 +80,23 @@ "load_save_button_active": [43, 45, 46, 255], "scrollbar_background": [245, 245, 245, 255], - "scrollbar_handle": [205, 202, 201, 255], + "scrollbar_handle": [12, 159, 227, 255], "scrollbar_handle_hover": [174, 174, 174, 255], "scrollbar_handle_down": [12, 159, 227, 255], - "setting_category": [205, 202, 201, 255], - "setting_category_disabled": [245, 245, 245, 255], - "setting_category_hover": [174, 174, 174, 255], - "setting_category_active": [12, 169, 227, 255], - "setting_category_active_hover": [34, 150, 190, 255], - "setting_category_text": [255, 255, 255, 255], + "setting_category": [238, 238, 238, 255], + "setting_category_disabled": [238, 238, 238, 255], + "setting_category_hover": [240, 248, 255, 255], + "setting_category_active": [238, 238, 238, 255], + "setting_category_active_hover": [240, 248, 255, 255], + "setting_category_text": [35, 35, 35, 255], - "setting_label": [140, 144, 154, 255], "setting_control": [255, 255, 255, 255], "setting_control_highlight": [245, 245, 245, 255], "setting_control_border": [174, 174, 174, 255], - "setting_control_text": [35, 35, 35, 255], - "setting_control_hover": [35, 35, 35, 255], + "setting_control_text": [0, 0, 0, 255], + "setting_control_hover": [139, 143, 153, 255], + "setting_control_selected": [35, 35, 35, 255], "setting_unit": [174, 174, 174, 255], "setting_validation_error": [255, 57, 14, 255], "setting_validation_warning": [255, 186, 15, 255], @@ -145,7 +145,6 @@ "toolbar_button": [2.0, 2.0], "toolbar_spacing": [1.0, 1.0], - "loadfile_button": [11.0, 2.4], "loadfile_margin": [0.8, 0.4], @@ -155,11 +154,11 @@ "sidebar_specs_bar": [0.0, 2.2], "sidebar_inputFields": [0.0, 1.9], - "section": [22.0, 3.0], - "section_icon": [2.14, 2.14], - "section_text_margin": [0.33, 0.33], + "section": [0.0, 1.8], + "section_icon": [1.2, 1.2], + "section_icon_column": [2.8, 0.0], - "setting": [21.0, 2.0], + "setting": [21.0, 1.8], "setting_control": [6.0, 2.0], "setting_control_margin": [3.0, 3.0], "setting_unit_margin": [0.5, 0.5], @@ -176,7 +175,7 @@ "progressbar_control": [8.0, 0.8], "progressbar_padding": [0.0, 1.0], - "scrollbar": [0.5, 0.5], + "scrollbar": [0.7, 0.5], "slider_groove": [0.5, 0.5], "slider_handle": [1.5, 1.5],