mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 08:48:58 +08:00
Add slicing status label
This commit is contained in:
parent
437636d103
commit
abd30dfde7
@ -10,20 +10,45 @@ import UM 1.1 as UM
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: base;
|
id: base;
|
||||||
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
|
|
||||||
property real progress: UM.Backend.progress;
|
property real progress: UM.Backend.progress;
|
||||||
property bool activity: Printer.getPlatformActivity;
|
property bool activity: Printer.getPlatformActivity;
|
||||||
Behavior on progress { NumberAnimation { duration: 250; } }
|
//Behavior on progress { NumberAnimation { duration: 250; } }
|
||||||
property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height
|
property int totalHeight: childrenRect.height + UM.Theme.sizes.default_margin.height
|
||||||
property string fileBaseName
|
property string fileBaseName
|
||||||
|
property string statusText: {
|
||||||
|
if(progress == 0) {
|
||||||
|
if(!activity) {
|
||||||
|
return catalog.i18nc("@label:PrintjobStatus","Please load a 3d model");
|
||||||
|
} else {
|
||||||
|
return catalog.i18nc("@label:PrintjobStatus","Preparing to slice...");
|
||||||
|
}
|
||||||
|
} else if(base.progress < 0.99) {
|
||||||
|
return catalog.i18nc("@label:PrintjobStatus","Slicing...");
|
||||||
|
} else {
|
||||||
|
return catalog.i18nc("@label:PrintjobStatus","Ready to ") + UM.OutputDeviceManager.activeDeviceShortDescription;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
Label {
|
||||||
|
id: statusLabel
|
||||||
|
width: parent.width - 2 * UM.Theme.sizes.default_margin.width
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width
|
||||||
|
|
||||||
|
color: UM.Theme.colors.text
|
||||||
|
font: UM.Theme.fonts.large
|
||||||
|
text: statusText;
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id: progressBar
|
id: progressBar
|
||||||
width: parent.width - 2 * UM.Theme.sizes.default_margin.width
|
width: parent.width - 2 * UM.Theme.sizes.default_margin.width
|
||||||
height: UM.Theme.sizes.progressbar.height
|
height: UM.Theme.sizes.progressbar.height
|
||||||
anchors.top: parent.top
|
anchors.top: statusLabel.bottom
|
||||||
|
anchors.topMargin: UM.Theme.sizes.default_margin.height/4
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width
|
||||||
radius: UM.Theme.sizes.progressbar_radius.width
|
radius: UM.Theme.sizes.progressbar_radius.width
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
"setting_category_disabled_border": [127, 127, 127, 255],
|
"setting_category_disabled_border": [127, 127, 127, 255],
|
||||||
"setting_category_hover_border": [12, 159, 227, 255],
|
"setting_category_hover_border": [12, 159, 227, 255],
|
||||||
"setting_category_active_border": [245, 245, 245, 255],
|
"setting_category_active_border": [245, 245, 245, 255],
|
||||||
"setting_category_active_hover_border": [12, 159, 227, 255],
|
"setting_category_active_hover_border": [245, 245, 245, 255],
|
||||||
|
|
||||||
"setting_control": [255, 255, 255, 255],
|
"setting_control": [255, 255, 255, 255],
|
||||||
"setting_control_selected": [24, 41, 77, 255],
|
"setting_control_selected": [24, 41, 77, 255],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user