From 7083ffd351a3feb00d0230a64619e07efaa943f5 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Sep 2015 10:14:45 -0700 Subject: [PATCH] Use a minimum size for the save button --- resources/qml/SaveButton.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 50808f9777..4b0770d652 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -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