Restyling of the sidebar header and and profile setup

commits to: issue CURA-177
This commit is contained in:
Tamara Hogenhout 2015-09-21 16:03:53 +02:00
parent d6793bc197
commit f866ecdd63
5 changed files with 48 additions and 57 deletions

View File

@ -8,23 +8,18 @@ import QtQuick.Layouts 1.1
import UM 1.1 as UM import UM 1.1 as UM
Column{ Item{
id: base; id: base;
UM.I18nCatalog { id: catalog; name:"cura"} UM.I18nCatalog { id: catalog; name:"cura"}
property int totalHeightProfileSetup: childrenRect.height property int totalHeightProfileSetup: childrenRect.height
property Action manageProfilesAction property Action manageProfilesAction
spacing: 0
Rectangle{
id: variantItem;
height: UM.Theme.sizes.sidebar_setup.height
width: base.width
visible: UM.MachineManager.hasVariants;
Rectangle { Rectangle {
id: variantRow id: variantRow
anchors.top: base.top
width: base.width width: base.width
height: parent.heigth height: UM.Theme.sizes.sidebar_setup.height
visible: UM.MachineManager.hasVariants;
Label{ Label{
id: variantLabel id: variantLabel
@ -67,10 +62,11 @@ Column{
} }
} }
} }
}
Rectangle{ Rectangle{
id: globalProfileRow; id: globalProfileRow;
anchors.top: UM.MachineManager.hasVariants ? variantRow.bottom : base.top
//anchors.top: variantRow.bottom
height: UM.Theme.sizes.sidebar_setup.height height: UM.Theme.sizes.sidebar_setup.height
width: base.width width: base.width
@ -148,8 +144,4 @@ Column{
// } // }
} }
} }
Rectangle{
width: base.width
height: UM.Theme.sizes.default_margin.width/2
}
} }

View File

@ -76,6 +76,7 @@ Rectangle
id: sidebarContents; id: sidebarContents;
anchors.bottom: saveButton.top anchors.bottom: saveButton.top
anchors.top: profileItem.bottom anchors.top: profileItem.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: base.left anchors.left: base.left
anchors.right: base.right anchors.right: base.right

View File

@ -80,8 +80,6 @@ Item
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
width: parent.width width: parent.width
height: UM.Theme.sizes.sidebar_header.height
currentIndex: base.currentIndex;
} }
} }
} }
@ -89,8 +87,9 @@ Item
Rectangle { Rectangle {
id: machineSelectionRow id: machineSelectionRow
width: base.width width: base.width
height: UM.Theme.sizes.sidebar_header.height height: UM.Theme.sizes.sidebar_setup.height
anchors.top: settingsModeRow.bottom anchors.top: settingsModeRow.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
Label{ Label{
@ -109,7 +108,6 @@ Item
width: parent.width/100*55 width: parent.width/100*55
height: UM.Theme.sizes.setting_control.height height: UM.Theme.sizes.setting_control.height
tooltip: UM.MachineManager.activeMachineInstance; tooltip: UM.MachineManager.activeMachineInstance;
//style: UM.Theme.styles.sidebar_header_button;
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View File

@ -34,17 +34,17 @@ QtObject {
elide: Text.ElideRight; elide: Text.ElideRight;
anchors.left: parent.left; anchors.left: parent.left;
anchors.leftMargin: UM.Theme.sizes.setting_unit_margin.width anchors.leftMargin: UM.Theme.sizes.setting_unit_margin.width
anchors.right: downArrow.left; anchors.right: separationLine.left;
anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width
anchors.verticalCenter: parent.verticalCenter; anchors.verticalCenter: parent.verticalCenter;
font: UM.Theme.fonts.default font: UM.Theme.fonts.default
} }
Rectangle{ Rectangle{
id: separationLine
width: 1 width: 1
height: UM.Theme.sizes.setting_control.height height: UM.Theme.sizes.setting_control.height
color: UM.Theme.colors.setting_control_border color: UM.Theme.colors.setting_control_border
anchors.right: sidebarComboBoxLabel.right anchors.right: downArrow.left
anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width + downArrow.width/2
anchors.top: parent.top anchors.top: parent.top
z: parent.z + 1 z: parent.z + 1
} }

View File

@ -155,7 +155,7 @@
"sidebar": [26.0, 10.0], "sidebar": [26.0, 10.0],
"sidebar_header": [0.0, 3.8], "sidebar_header": [0.0, 3.8],
"sidebar_header_mode_toggle": [0.0, 2.4], "sidebar_header_mode_toggle": [0.0, 2.4],
"sidebar_setup": [0.0, 2.8], "sidebar_setup": [0.0, 2.6],
"sidebar_subParts": [0.0, 2.4], "sidebar_subParts": [0.0, 2.4],
"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],
@ -166,7 +166,7 @@
"section_icon_column": [2.8, 0.0], "section_icon_column": [2.8, 0.0],
"setting": [21.0, 1.8], "setting": [21.0, 1.8],
"setting_control": [6.0, 2.0], "setting_control": [7.5, 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],
"setting_text_maxwidth": [40.0, 0.0], "setting_text_maxwidth": [40.0, 0.0],