diff options
Diffstat (limited to 'LeftPanel.qml')
| -rw-r--r-- | LeftPanel.qml | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/LeftPanel.qml b/LeftPanel.qml index ef908cc7..a5766c3e 100644 --- a/LeftPanel.qml +++ b/LeftPanel.qml @@ -35,9 +35,11 @@ Rectangle { id: panel property alias unlockedBalanceText: unlockedBalanceText.text + property alias balanceLabelText: balanceLabel.text property alias balanceText: balanceText.text property alias networkStatus : networkStatus property alias progressBar : progressBar + property alias minutesToUnlockTxt: unlockedBalanceLabel.text signal dashboardClicked() signal historyClicked() @@ -109,6 +111,7 @@ Rectangle { spacing: 5 Label { + id: balanceLabel text: qsTr("Balance") + translationManager.emptyString anchors.left: parent.left anchors.leftMargin: 50 @@ -131,9 +134,17 @@ Rectangle { id: balanceText anchors.verticalCenter: parent.verticalCenter font.family: "Arial" - font.pixelSize: 26 color: "#000000" text: "N/A" + // dynamically adjust text size + font.pixelSize: { + var digits = text.split('.')[0].length + var defaultSize = 25; + if(digits > 2) { + return defaultSize - 1.1*digits + } + return defaultSize; + } } } @@ -144,7 +155,8 @@ Rectangle { } Label { - text: qsTr("Unlocked balance") + translationManager.emptyString + id: unlockedBalanceLabel + text: qsTr("Unlocked balance") anchors.left: parent.left anchors.leftMargin: 50 tipText: qsTr("Test tip 2<br/><br/>line 2") + translationManager.emptyString @@ -155,9 +167,17 @@ Rectangle { anchors.left: parent.left anchors.leftMargin: 50 font.family: "Arial" - font.pixelSize: 18 color: "#000000" text: "N/A" + // dynamically adjust text size + font.pixelSize: { + var digits = text.split('.')[0].length + var defaultSize = 18; + if(digits > 3) { + return defaultSize - 0.6*digits + } + return defaultSize; + } } } @@ -264,6 +284,7 @@ Rectangle { } Rectangle { + visible: addressBookButton.present anchors.left: parent.left anchors.right: parent.right anchors.leftMargin: 16 @@ -376,6 +397,7 @@ Rectangle { } } Rectangle { + visible: txkeyButton.present anchors.left: parent.left anchors.right: parent.right anchors.leftMargin: 16 @@ -399,6 +421,7 @@ Rectangle { } } Rectangle { + visible: signButton.present anchors.left: parent.left anchors.right: parent.right anchors.leftMargin: 16 |
