mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 17:57:55 -06:00
Restyling of the save to toolpath button
When the text is to long for the infobox, it is elided of the "Estimated print-time" message is not shown. Contributes to #54
This commit is contained in:
parent
21ec546ec5
commit
a9f87d5d34
2 changed files with 10 additions and 5 deletions
|
@ -82,11 +82,12 @@ Rectangle {
|
||||||
} else if (base.progress < 0.99) {
|
} else if (base.progress < 0.99) {
|
||||||
//: Save button label
|
//: Save button label
|
||||||
return qsTr("Calculating Print-time");
|
return qsTr("Calculating Print-time");
|
||||||
} else if (base.progress > 0.99){
|
} else if (base.printDuration.days > 0 || base.progress == null){
|
||||||
|
return qsTr("");
|
||||||
|
}
|
||||||
|
else if (base.progress > 0.99){
|
||||||
//: Save button label
|
//: Save button label
|
||||||
return qsTr("Estimated Print-time");
|
return qsTr("Estimated Print-time");
|
||||||
} else if (base.progress == null){
|
|
||||||
return qsTr("");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
|
@ -104,8 +105,12 @@ Rectangle {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: printDurationLabel.right;
|
anchors.left: printDurationLabel.right;
|
||||||
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width;
|
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width;
|
||||||
color: UM.Theme.colors.save_button_printtime_text;
|
color: base.printDuration.days > 0 ? UM.Theme.colors.save_button_estimated_text : UM.Theme.colors.save_button_printtime_text;
|
||||||
font: UM.Theme.fonts.small;
|
font: UM.Theme.fonts.small;
|
||||||
|
|
||||||
|
property bool mediumLengthDuration: base.printDuration.hours > 9 && base.printMaterialAmount > 9.99 && base.printDuration.days == 0
|
||||||
|
width: mediumLengthDuration ? 50 : undefined
|
||||||
|
elide: mediumLengthDuration ? Text.ElideRight : Text.ElideNone
|
||||||
visible: base.progress < 0.99 ? false : true
|
visible: base.progress < 0.99 ? false : true
|
||||||
//: Print material amount save button label
|
//: Print material amount save button label
|
||||||
text: base.printMaterialAmount < 0 ? "" : qsTr("%1m material").arg(base.printMaterialAmount);
|
text: base.printMaterialAmount < 0 ? "" : qsTr("%1m material").arg(base.printMaterialAmount);
|
||||||
|
|
|
@ -160,7 +160,7 @@
|
||||||
"tooltip_margins": [1.0, 1.0],
|
"tooltip_margins": [1.0, 1.0],
|
||||||
|
|
||||||
"save_button_border": [0.06, 0.06],
|
"save_button_border": [0.06, 0.06],
|
||||||
"save_button_text_margin": [0.6, 0.6],
|
"save_button_text_margin": [0.3, 0.6],
|
||||||
"save_button_slicing_bar": [0.0, 2.2],
|
"save_button_slicing_bar": [0.0, 2.2],
|
||||||
"save_button_label_margin": [0.5, 0.5],
|
"save_button_label_margin": [0.5, 0.5],
|
||||||
"save_button_save_to_button": [0.3, 2.7],
|
"save_button_save_to_button": [0.3, 2.7],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue