From f262ce520978fa406e6531ffc9a8464a14a3a722 Mon Sep 17 00:00:00 2001 From: Sander Ferdinand Date: Sun, 10 Dec 2017 19:52:05 +0100 Subject: Finishing up on the settings page for now and modified some QML components --- components/LineEdit.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'components/LineEdit.qml') 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 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 { -- cgit v1.2.3