mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Show slicing progress in SaveButton area instead of MessageStack
Add separators to sidebar Tweak theme
This commit is contained in:
parent
e293501e37
commit
6bfed19477
5 changed files with 57 additions and 21 deletions
|
@ -134,11 +134,11 @@ class CuraEngineBackend(Backend):
|
|||
return #No slicing if we have error values since those are by definition illegal values.
|
||||
|
||||
self.processingProgress.emit(0.0)
|
||||
if not self._message:
|
||||
self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1)
|
||||
self._message.show()
|
||||
else:
|
||||
if self._message:
|
||||
self._message.setProgress(-1)
|
||||
#else:
|
||||
# self._message = Message(catalog.i18nc("@info:status", "Slicing..."), 0, False, -1)
|
||||
# self._message.show()
|
||||
|
||||
self._scene.gcode_list = []
|
||||
self._slicing = True
|
||||
|
|
|
@ -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: ''
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
|
||||
"error": [255, 140, 0, 255],
|
||||
"sidebar_header_bar": [24, 41, 77, 255],
|
||||
"sidebar_lining": [245, 245, 245, 255],
|
||||
|
||||
"button": [24, 41, 77, 255],
|
||||
"button_hover": [70, 84, 113, 255],
|
||||
|
@ -156,16 +157,15 @@
|
|||
"sizes": {
|
||||
"window_margin": [1.0, 1.0],
|
||||
"default_margin": [1.0, 1.0],
|
||||
"default_lining": [0.25, 0.25],
|
||||
"default_lining": [0.08, 0.08],
|
||||
"logo": [9.5, 2.0],
|
||||
|
||||
"sidebar": [30.0, 10.0],
|
||||
"sidebar_header": [0.0, 4.0],
|
||||
"sidebar_header_mode_toggle": [0.0, 2.0],
|
||||
"sidebar_setup": [0.0, 2.6],
|
||||
"sidebar_subParts": [0.0, 2.4],
|
||||
"sidebar_specs_bar": [0.0, 2.2],
|
||||
"sidebar_inputFields": [0.0, 1.9],
|
||||
"sidebar_lining": [0.5, 0.5],
|
||||
"sidebar_setup": [0.0, 2.0],
|
||||
"sidebar_inputfields": [0.0, 2.0],
|
||||
"simple_mode_infill_caption": [0.0, 5.0],
|
||||
"simple_mode_infill_height": [0.0, 8.0],
|
||||
|
||||
|
@ -190,10 +190,11 @@
|
|||
"button_lining": [0, 0],
|
||||
|
||||
"progressbar": [26.0, 0.8],
|
||||
"progressbar_radius": [0.4, 0.4],
|
||||
"progressbar_control": [8.0, 0.8],
|
||||
"progressbar_padding": [0.0, 1.0],
|
||||
|
||||
"scrollbar": [0.7, 0.5],
|
||||
"scrollbar": [0.75, 0.5],
|
||||
|
||||
"slider_groove": [0.5, 0.5],
|
||||
"slider_handle": [1.5, 1.5],
|
||||
|
@ -207,8 +208,6 @@
|
|||
"tooltip": [20.0, 10.0],
|
||||
"tooltip_margins": [1.0, 1.0],
|
||||
|
||||
"save_button_border": [0.06, 0.06],
|
||||
"save_button_header": [0.0, 3.2],
|
||||
"save_button_text_margin": [0.3, 0.6],
|
||||
"save_button_slicing_bar": [0.0, 2.2],
|
||||
"save_button_label_margin": [0.5, 0.5],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue