diff options
| author | xiphon <xiphon@protonmail.com> | 2020-12-24 08:05:14 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2020-12-24 08:20:38 +0000 |
| commit | ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447 (patch) | |
| tree | 0d8c1abb14863f854c5aed5991ae391f2efc53bc /components/LineEdit.qml | |
| parent | fed00a5662dcbc77c928a06778d7c9001e7d90f9 (diff) | |
| download | monzero-gui-ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447.tar.gz monzero-gui-ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447.tar.xz monzero-gui-ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447.zip | |
LineEdit: fix padding, fix inline buttons layout, multiple btns support
Diffstat (limited to 'components/LineEdit.qml')
| -rw-r--r-- | components/LineEdit.qml | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml index aad42895..516cee2d 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -29,11 +29,15 @@ import FontAwesome 1.0 import QtQuick 2.9 import QtGraphicalEffects 1.0 +import QtQuick.Layouts 1.1 import "../components" as MoneroComponents Item { id: item + + default property alias content: inlineButtons.children + property alias input: input property alias text: input.text @@ -53,8 +57,6 @@ Item { property alias validator: input.validator property alias readOnly : input.readOnly property alias cursorPosition: input.cursorPosition - property alias inlineButton: inlineButtonId - property alias inlineButtonText: inlineButtonId.text property alias inlineIcon: inlineIcon.visible property bool copyButton: false property alias copyButtonText: copyButtonId.text @@ -239,6 +241,7 @@ Item { onEditingFinished: item.editingFinished() onAccepted: item.accepted(); onTextChanged: item.textUpdated() + rightPadding: inlineButtons.width + 14 topPadding: 10 bottomPadding: 10 echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal @@ -262,13 +265,15 @@ Item { onClicked: passwordToggle() } } - } - MoneroComponents.InlineButton { - id: inlineButtonId - visible: item.inlineButtonText ? true : false - anchors.right: parent.right - anchors.rightMargin: 8 + RowLayout { + id: inlineButtons + anchors.bottom: parent.bottom + anchors.top: parent.top + anchors.right: parent.right + anchors.margins: 4 + spacing: 4 + } } } } |
