LineEditMulti: fix showingHeader and padding (empty label case)

This commit is contained in:
xiphon 2018-12-21 06:21:41 +00:00
parent bac833c1dd
commit 787234e838

View file

@ -78,7 +78,7 @@ ColumnLayout {
property var onPaste: function(clipboardText) { property var onPaste: function(clipboardText) {
item.text = clipboardText; item.text = clipboardText;
} }
property bool showingHeader: true property bool showingHeader: labelText != "" || copyButton || pasteButton
property var wrapMode: Text.NoWrap property var wrapMode: Text.NoWrap
property alias addressValidation: input.addressValidation property alias addressValidation: input.addressValidation
property string backgroundColor: "" // mock property string backgroundColor: "" // mock
@ -150,7 +150,7 @@ ColumnLayout {
readOnly: false readOnly: false
addressValidation: false addressValidation: false
Layout.fillWidth: true Layout.fillWidth: true
topPadding: item.showingHeader ? 10 * scaleRatio : 0 topPadding: 10 * scaleRatio
bottomPadding: 10 * scaleRatio bottomPadding: 10 * scaleRatio
wrapMode: item.wrapMode wrapMode: item.wrapMode
fontSize: item.fontSize fontSize: item.fontSize