From 1918c5e24a3c61260c5d16cd67921207bf984db2 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Wed, 8 Mar 2017 20:37:58 +0100 Subject: [PATCH] fix dynamic button width --- components/StandardButton.qml | 4 ++-- pages/Settings.qml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/StandardButton.qml b/components/StandardButton.qml index f1253cd9..bb2f4d94 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -43,8 +43,8 @@ Item { signal clicked() // Dynamic label width - width: label.contentWidth + 20 - Layout.minimumWidth: 100 + Layout.minimumWidth: (label.contentWidth > 100)? label.contentWidth + 20 : 100 + Rectangle { diff --git a/pages/Settings.qml b/pages/Settings.qml index 10ccb64a..1d6a4ca8 100644 --- a/pages/Settings.qml +++ b/pages/Settings.qml @@ -84,7 +84,6 @@ Rectangle { RowLayout { StandardButton { id: closeWalletButton - width: 100 text: qsTr("Close wallet") + translationManager.emptyString shadowReleasedColor: "#FF4304" shadowPressedColor: "#B32D00" @@ -118,7 +117,6 @@ Rectangle { releasedColor: "#FF6C3C" pressedColor: "#FF4304" text: qsTr("Show seed") + translationManager.emptyString - Layout.alignment: Qt.AlignRight onClicked: { settingsPasswordDialog.open(); }