diff options
| author | Sander Ferdinand <sa.ferdinand@gmail.com> | 2017-12-10 19:52:05 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-03-29 23:04:02 +0100 |
| commit | f262ce520978fa406e6531ffc9a8464a14a3a722 (patch) | |
| tree | 71c838057f4fcf897c093292ecec748f4176e189 /components/LineEdit.qml | |
| parent | be9cb8931c9bfe9fccf9d4ec7060dc467a1a6c8e (diff) | |
| download | monzero-gui-f262ce520978fa406e6531ffc9a8464a14a3a722.tar.gz monzero-gui-f262ce520978fa406e6531ffc9a8464a14a3a722.tar.xz monzero-gui-f262ce520978fa406e6531ffc9a8464a14a3a722.zip | |
Finishing up on the settings page for now and modified some QML components
Diffstat (limited to 'components/LineEdit.qml')
| -rw-r--r-- | components/LineEdit.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml index d52db763..42da1e9d 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -53,12 +53,13 @@ Item { property bool labelFontBold: false property alias labelWrapMode: inputLabel.wrapMode property alias labelHorizontalAlignment: inputLabel.horizontalAlignment + property bool showingHeader: inputLabel.text !== "" || copyButton signal labelLinkActivated(); // input label, rich text <a> signal signal editingFinished(); signal accepted(); signal textUpdated(); - height: (inputLabel.height + inputItem.height + 2) * scaleRatio + height: showingHeader ? (inputLabel.height + inputItem.height + 2) * scaleRatio : 42 * scaleRatio onTextUpdated: { // check to remove placeholder text when there is content @@ -109,14 +110,14 @@ Item { appWindow.showStatusMessage(qsTr("Copied to clipboard"),3) } } - visible: input.text && copyButton ? true : false + visible: copyButton && input.text !== "" } Item{ id: inputItem height: 40 * scaleRatio - anchors.top: inputLabel.bottom - anchors.topMargin: 6 * scaleRatio + anchors.top: showingHeader ? inputLabel.bottom : parent.top + anchors.topMargin: showingHeader ? 6 * scaleRatio : 2 width: parent.width Text { |
