aboutsummaryrefslogtreecommitdiff
path: root/components/StandardButton.qml
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-01-04 17:20:45 +0100
committerJaquee <jaquee.monero@gmail.com>2017-01-15 12:32:06 +0100
commit842e4df22309dfcbb7ab534dc829e44b423eae4c (patch)
tree421111c3d8a7dee6293a1dd5afe235df15d2733f /components/StandardButton.qml
parent7cbd61dae21fdf8a27081d28ebb130195d77ed69 (diff)
downloadmonzero-gui-842e4df22309dfcbb7ab534dc829e44b423eae4c.tar.gz
monzero-gui-842e4df22309dfcbb7ab534dc829e44b423eae4c.tar.xz
monzero-gui-842e4df22309dfcbb7ab534dc829e44b423eae4c.zip
adjust button size dynamically
Diffstat (limited to 'components/StandardButton.qml')
-rw-r--r--components/StandardButton.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index 17f56c3d..1d3f8192 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -27,6 +27,7 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
+import QtQuick.Layouts 1.1
Item {
id: button
@@ -41,6 +42,10 @@ Item {
property alias text: label.text
signal clicked()
+ // Dynamic label width
+ width: label.contentWidth + 20
+ Layout.minimumWidth: 100
+
Rectangle {
anchors.left: parent.left
@@ -78,13 +83,13 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
horizontalAlignment: Text.AlignHCenter
- elide: Text.ElideRight
font.family: "Arial"
font.bold: true
font.letterSpacing: -1
font.pixelSize: button.fontSize
color: parent.textColor
visible: parent.icon === ""
+ font.capitalization : Font.AllUppercase
}
Image {