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 {
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;