From 2bb1092472c2dbc618b4ba3f1c109c3c8d8ab7c0 Mon Sep 17 00:00:00 2001 From: xiphon Date: Thu, 4 Feb 2021 11:45:25 +0000 Subject: [PATCH] LineEditMulti: right padding, fontFamily, backtab, inline btns vcenter --- components/InlineButton.qml | 1 - components/LineEditMulti.qml | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/InlineButton.qml b/components/InlineButton.qml index 107614d5..9d6cba06 100644 --- a/components/InlineButton.qml +++ b/components/InlineButton.qml @@ -46,7 +46,6 @@ Item { property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid property alias buttonColor: rect.color - Layout.rightMargin: isFontAwesomeIcon ? 0 : 4 height: isFontAwesomeIcon ? 30 : 24 width: isFontAwesomeIcon ? height : inlineText.width + 16 diff --git a/components/LineEditMulti.qml b/components/LineEditMulti.qml index 7f2e377e..a33893c9 100644 --- a/components/LineEditMulti.qml +++ b/components/LineEditMulti.qml @@ -44,7 +44,7 @@ ColumnLayout { property alias placeholderText: placeholderLabel.text property int inputPaddingLeft: 10 - property alias inputPaddingRight: input.rightPadding + property int inputPaddingRight: 10 property int inputPaddingTop: 10 property int inputPaddingBottom: 10 property int inputRadius: 4 @@ -75,6 +75,7 @@ ColumnLayout { property bool labelButtonVisible: false property string fontColor: MoneroComponents.Style.defaultFontColor + property string fontFamily: MoneroComponents.Style.fontRegular.name property bool fontBold: false property int fontSize: 16 @@ -158,16 +159,18 @@ ColumnLayout { id: input readOnly: false addressValidation: false + KeyNavigation.backtab: item.KeyNavigation.backtab KeyNavigation.priority: KeyNavigation.BeforeItem KeyNavigation.tab: item.KeyNavigation.tab Layout.fillWidth: true leftPadding: item.inputPaddingLeft - rightPadding: inlineButtons.width + 14 + rightPadding: (inlineButtons.width > 0 ? inlineButtons.width + inlineButtons.spacing : 0) + inputPaddingRight topPadding: item.inputPaddingTop bottomPadding: item.inputPaddingBottom wrapMode: item.wrapMode + font.family: item.fontFamily fontSize: item.fontSize fontBold: item.fontBold fontColor: item.fontColor @@ -201,9 +204,9 @@ ColumnLayout { RowLayout { id: inlineButtons - anchors.top: parent.top + anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.margins: 4 + anchors.rightMargin: inputPaddingRight spacing: 4 } }