15.10 restyling of the sidebar header

Not yet finished

Contributes to: issue CURA-60
This commit is contained in:
Tamara Hogenhout 2015-08-31 17:27:53 +02:00
parent 33aa5f596f
commit 9fd5ea4f9f
2 changed files with 49 additions and 42 deletions

View File

@ -235,7 +235,7 @@ QtObject {
property Component sidebar_category: Component { property Component sidebar_category: Component {
ButtonStyle { ButtonStyle {
background: UM.AngledCornerRectangle { background: Rectangle {
implicitHeight: UM.Theme.sizes.section.height; implicitHeight: UM.Theme.sizes.section.height;
color: { color: {
if(control.color) { if(control.color) {
@ -253,37 +253,51 @@ QtObject {
} }
} }
Behavior on color { ColorAnimation { duration: 50; } } Behavior on color { ColorAnimation { duration: 50; } }
cornerSize: UM.Theme.sizes.default_margin.width;
} }
label: Item { label: Item {
anchors.fill: parent; anchors.fill: parent;
anchors.margins: UM.Theme.sizes.default_margin.width; anchors.left: parent.left
Item{
Image {
id: icon; id: icon;
anchors.left: parent.left
anchors.left: parent.left; height: parent.height
anchors.verticalCenter: parent.verticalCenter; width: UM.Theme.sizes.section_icon_column.width
UM.RecolorImage {
source: control.iconSource; anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.sizes.section_icon.width; anchors.horizontalCenter: parent.horizontalCenter
height: UM.Theme.sizes.section_icon.height; 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 { Label {
anchors { anchors {
left: icon.right; left: icon.right;
leftMargin: UM.Theme.sizes.default_margin.width;
right: parent.right; right: parent.right;
verticalCenter: parent.verticalCenter; verticalCenter: parent.verticalCenter;
} }
text: control.text; text: control.text;
font: UM.Theme.fonts.setting_category; font: UM.Theme.fonts.setting_category;
color: UM.Theme.colors.setting_category_text; color: UM.Theme.colors.setting_category_text;
fontSizeMode: Text.HorizontalFit; fontSizeMode: Text.HorizontalFit;
minimumPointSize: 8 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 transientScrollBars: false
scrollBarBackground: UM.AngledCornerRectangle { scrollBarBackground: Rectangle {
implicitWidth: UM.Theme.sizes.scrollbar.width; implicitWidth: UM.Theme.sizes.scrollbar.width
cornerSize: UM.Theme.sizes.scrollbar.width;
color: UM.Theme.colors.scrollbar_background; color: UM.Theme.colors.scrollbar_background;
} }
handle: UM.AngledCornerRectangle { handle: Rectangle {
id: scrollViewHandle id: scrollViewHandle
implicitWidth: UM.Theme.sizes.scrollbar.width; 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; 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; } } Behavior on color { ColorAnimation { duration: 50; } }
} }
@ -317,14 +326,13 @@ QtObject {
property variant setting_item: UM.SettingItemStyle { property variant setting_item: UM.SettingItemStyle {
labelFont: UM.Theme.fonts.default; 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; fixedHeight: UM.Theme.sizes.setting.height;
controlWidth: UM.Theme.sizes.setting_control.width; controlWidth: UM.Theme.sizes.setting_control.width;
controlRightMargin: UM.Theme.sizes.setting_control_margin.width; controlRightMargin: UM.Theme.sizes.setting_control_margin.width;
controlBorderWidth: 1;
controlColor: UM.Theme.colors.setting_control; controlColor: UM.Theme.colors.setting_control;
controlHighlightColor: UM.Theme.colors.setting_control_highlight; controlHighlightColor: UM.Theme.colors.setting_control_highlight;
controlBorderColor: UM.Theme.colors.setting_control_border; controlBorderColor: UM.Theme.colors.setting_control_border;

View File

@ -43,7 +43,7 @@
"family": "ProximaNova" "family": "ProximaNova"
}, },
"setting_category": { "setting_category": {
"size": 1.5, "size": 1.0,
"family": "ProximaNova" "family": "ProximaNova"
} }
}, },
@ -80,23 +80,23 @@
"load_save_button_active": [43, 45, 46, 255], "load_save_button_active": [43, 45, 46, 255],
"scrollbar_background": [245, 245, 245, 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_hover": [174, 174, 174, 255],
"scrollbar_handle_down": [12, 159, 227, 255], "scrollbar_handle_down": [12, 159, 227, 255],
"setting_category": [205, 202, 201, 255], "setting_category": [238, 238, 238, 255],
"setting_category_disabled": [245, 245, 245, 255], "setting_category_disabled": [238, 238, 238, 255],
"setting_category_hover": [174, 174, 174, 255], "setting_category_hover": [240, 248, 255, 255],
"setting_category_active": [12, 169, 227, 255], "setting_category_active": [238, 238, 238, 255],
"setting_category_active_hover": [34, 150, 190, 255], "setting_category_active_hover": [240, 248, 255, 255],
"setting_category_text": [255, 255, 255, 255], "setting_category_text": [35, 35, 35, 255],
"setting_label": [140, 144, 154, 255],
"setting_control": [255, 255, 255, 255], "setting_control": [255, 255, 255, 255],
"setting_control_highlight": [245, 245, 245, 255], "setting_control_highlight": [245, 245, 245, 255],
"setting_control_border": [174, 174, 174, 255], "setting_control_border": [174, 174, 174, 255],
"setting_control_text": [35, 35, 35, 255], "setting_control_text": [0, 0, 0, 255],
"setting_control_hover": [35, 35, 35, 255], "setting_control_hover": [139, 143, 153, 255],
"setting_control_selected": [35, 35, 35, 255],
"setting_unit": [174, 174, 174, 255], "setting_unit": [174, 174, 174, 255],
"setting_validation_error": [255, 57, 14, 255], "setting_validation_error": [255, 57, 14, 255],
"setting_validation_warning": [255, 186, 15, 255], "setting_validation_warning": [255, 186, 15, 255],
@ -145,7 +145,6 @@
"toolbar_button": [2.0, 2.0], "toolbar_button": [2.0, 2.0],
"toolbar_spacing": [1.0, 1.0], "toolbar_spacing": [1.0, 1.0],
"loadfile_button": [11.0, 2.4], "loadfile_button": [11.0, 2.4],
"loadfile_margin": [0.8, 0.4], "loadfile_margin": [0.8, 0.4],
@ -155,11 +154,11 @@
"sidebar_specs_bar": [0.0, 2.2], "sidebar_specs_bar": [0.0, 2.2],
"sidebar_inputFields": [0.0, 1.9], "sidebar_inputFields": [0.0, 1.9],
"section": [22.0, 3.0], "section": [0.0, 1.8],
"section_icon": [2.14, 2.14], "section_icon": [1.2, 1.2],
"section_text_margin": [0.33, 0.33], "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": [6.0, 2.0],
"setting_control_margin": [3.0, 3.0], "setting_control_margin": [3.0, 3.0],
"setting_unit_margin": [0.5, 0.5], "setting_unit_margin": [0.5, 0.5],
@ -176,7 +175,7 @@
"progressbar_control": [8.0, 0.8], "progressbar_control": [8.0, 0.8],
"progressbar_padding": [0.0, 1.0], "progressbar_padding": [0.0, 1.0],
"scrollbar": [0.5, 0.5], "scrollbar": [0.7, 0.5],
"slider_groove": [0.5, 0.5], "slider_groove": [0.5, 0.5],
"slider_handle": [1.5, 1.5], "slider_handle": [1.5, 1.5],