mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Use a minimum size for the save button
This commit is contained in:
parent
690bd7b861
commit
7083ffd351
1 changed files with 9 additions and 2 deletions
|
@ -193,14 +193,21 @@ Rectangle {
|
|||
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
width: {
|
||||
var w = 0;
|
||||
if (base.width*0.55 > actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)){
|
||||
saveToButton.resizedWidth = base.width*0.55
|
||||
return base.width*0.55
|
||||
w = base.width*0.55
|
||||
}
|
||||
else {
|
||||
saveToButton.resizedWidth = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
|
||||
return actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
|
||||
w = actualLabel.width + (UM.Theme.sizes.default_margin.width * 2)
|
||||
}
|
||||
|
||||
if(w < base.width * 0.55) {
|
||||
w = base.width * 0.55;
|
||||
}
|
||||
|
||||
return w;
|
||||
}
|
||||
Label {
|
||||
id: actualLabel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue