Show slicing progress in SaveButton area instead of MessageStack

Add separators to sidebar
Tweak theme
This commit is contained in:
fieldOfView 2015-11-17 16:51:40 +01:00
parent e293501e37
commit 6bfed19477
5 changed files with 57 additions and 21 deletions

View file

@ -76,7 +76,7 @@ Rectangle {
TextField {
id: printJobTextfield
anchors.right: parent.right
height: UM.Theme.sizes.sidebar_inputFields.height
height: UM.Theme.sizes.sidebar_inputfields.height
width: base.width
property int unremovableSpacing: 5
text: ''

View file

@ -14,23 +14,42 @@ Rectangle {
property real progress: UM.Backend.progress;
property bool activity: Printer.getPlatformActivity;
Behavior on progress { NumberAnimation { duration: 250; } }
property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height*1.5
property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height
property string fileBaseName
UM.I18nCatalog { id: catalog; name:"cura"}
Rectangle{
id: progressBar
width: parent.width - 2 * UM.Theme.sizes.default_margin.width
height: UM.Theme.sizes.progressbar.height
anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
radius: UM.Theme.sizes.progressbar_radius.width
color: UM.Theme.colors.progressbar_background
Rectangle{
width: Math.max(parent.width * base.progress)
height: parent.height
color: UM.Theme.colors.progressbar_control
radius: UM.Theme.sizes.progressbar_radius.width
visible: base.progress > 0.99 ? false : true
}
}
Rectangle{
id: saveRow
width: base.width
height: saveToButton.height + (UM.Theme.sizes.default_margin.height / 2) // height + bottomMargin
anchors.top: parent.top
height: saveToButton.height
anchors.top: progressBar.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
Button {
id: saveToButton
property int resizedWidth
x: base.width - saveToButton.resizedWidth - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.save_button_save_to_button.height + 2
x: base.width - saveToButton.resizedWidth - UM.Theme.sizes.default_margin.width - UM.Theme.sizes.save_button_save_to_button.height + 3
tooltip: UM.OutputDeviceManager.activeDeviceDescription;
enabled: base.progress > 0.99 && base.activity == true
height: UM.Theme.sizes.save_button_save_to_button.height

View file

@ -52,6 +52,15 @@ Rectangle
configureMachinesAction: base.configureMachinesAction;
}
Rectangle {
id: headerSeparator
width: parent.width
height: UM.Theme.sizes.sidebar_lining.height
color: UM.Theme.colors.sidebar_lining
anchors.top: header.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
}
ProfileSetup {
id: profileItem
manageProfilesAction: base.manageProfilesAction
@ -80,7 +89,7 @@ Rectangle
text: catalog.i18nc("@label:listbox","Setup");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
anchors.top: header.bottom
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width/100*45
font: UM.Theme.fonts.large;
@ -93,7 +102,7 @@ Rectangle
height: UM.Theme.sizes.sidebar_header_mode_toggle.height
anchors.right: parent.right
anchors.rightMargin: UM.Theme.sizes.default_margin.width
anchors.top: header.bottom
anchors.top: headerSeparator.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
Component{
id: wizardDelegate
@ -145,7 +154,7 @@ Rectangle
Loader
{
id: sidebarContents;
anchors.bottom: saveButton.top
anchors.bottom: footerSeparator.top
anchors.top: profileItem.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: base.left
@ -172,6 +181,15 @@ Rectangle
}
}
Rectangle {
id: footerSeparator
width: parent.width
height: UM.Theme.sizes.sidebar_lining.height
color: UM.Theme.colors.sidebar_lining
anchors.bottom: saveButton.top
anchors.bottomMargin: UM.Theme.sizes.default_margin.height
}
SaveButton
{
id: saveButton;