X-Git-Url: https://www.flypig.org.uk/git/?p=openvpnui.git;a=blobdiff_plain;f=qml%2Fcomponents%2FValueButtonAlignRight.qml;fp=qml%2Fcomponents%2FValueButtonAlignRight.qml;h=12fcb9d0345b9f40f4cb3ff445d20d2c0d0d9f8c;hp=899e16fdaa4a6dd3f0cc175c0c162f089320b5ec;hb=052fa14434d3ca4b7d08c2c2fccf3791e20afbaa;hpb=e24363e314aca32e7bee952f02f517a04a8dc5f2 diff --git a/qml/components/ValueButtonAlignRight.qml b/qml/components/ValueButtonAlignRight.qml index 899e16f..12fcb9d 100644 --- a/qml/components/ValueButtonAlignRight.qml +++ b/qml/components/ValueButtonAlignRight.qml @@ -39,7 +39,6 @@ BackgroundItem { id: root property alias label: titleText.text - property alias value: valueText.text property alias labelColor: titleText.color property alias valueColor: valueText.color @@ -47,6 +46,8 @@ BackgroundItem { property real labelMargin: Theme.paddingLarge property int _duration: 200 + property string value + property string placeholderText width: parent ? parent.width : 0 height: contentItem.height @@ -75,6 +76,7 @@ BackgroundItem { width: Math.min(implicitWidth, parent.width) truncationMode: TruncationMode.Fade horizontalAlignment: ((implicitWidth <= (parent.width - titleText.width)) ? Text.AlignLeft : Text.AlignRight) + text: (value != "" ? value : placeholderText) } } }