LineEditMulti: right padding, fontFamily, backtab, inline btns vcenter

This commit is contained in:
xiphon 2021-02-04 11:45:25 +00:00
parent c1573c2c2a
commit 2bb1092472
2 changed files with 7 additions and 5 deletions

View File

@ -46,7 +46,6 @@ Item {
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
property alias buttonColor: rect.color property alias buttonColor: rect.color
Layout.rightMargin: isFontAwesomeIcon ? 0 : 4
height: isFontAwesomeIcon ? 30 : 24 height: isFontAwesomeIcon ? 30 : 24
width: isFontAwesomeIcon ? height : inlineText.width + 16 width: isFontAwesomeIcon ? height : inlineText.width + 16

View File

@ -44,7 +44,7 @@ ColumnLayout {
property alias placeholderText: placeholderLabel.text property alias placeholderText: placeholderLabel.text
property int inputPaddingLeft: 10 property int inputPaddingLeft: 10
property alias inputPaddingRight: input.rightPadding property int inputPaddingRight: 10
property int inputPaddingTop: 10 property int inputPaddingTop: 10
property int inputPaddingBottom: 10 property int inputPaddingBottom: 10
property int inputRadius: 4 property int inputRadius: 4
@ -75,6 +75,7 @@ ColumnLayout {
property bool labelButtonVisible: false property bool labelButtonVisible: false
property string fontColor: MoneroComponents.Style.defaultFontColor property string fontColor: MoneroComponents.Style.defaultFontColor
property string fontFamily: MoneroComponents.Style.fontRegular.name
property bool fontBold: false property bool fontBold: false
property int fontSize: 16 property int fontSize: 16
@ -158,16 +159,18 @@ ColumnLayout {
id: input id: input
readOnly: false readOnly: false
addressValidation: false addressValidation: false
KeyNavigation.backtab: item.KeyNavigation.backtab
KeyNavigation.priority: KeyNavigation.BeforeItem KeyNavigation.priority: KeyNavigation.BeforeItem
KeyNavigation.tab: item.KeyNavigation.tab KeyNavigation.tab: item.KeyNavigation.tab
Layout.fillWidth: true Layout.fillWidth: true
leftPadding: item.inputPaddingLeft leftPadding: item.inputPaddingLeft
rightPadding: inlineButtons.width + 14 rightPadding: (inlineButtons.width > 0 ? inlineButtons.width + inlineButtons.spacing : 0) + inputPaddingRight
topPadding: item.inputPaddingTop topPadding: item.inputPaddingTop
bottomPadding: item.inputPaddingBottom bottomPadding: item.inputPaddingBottom
wrapMode: item.wrapMode wrapMode: item.wrapMode
font.family: item.fontFamily
fontSize: item.fontSize fontSize: item.fontSize
fontBold: item.fontBold fontBold: item.fontBold
fontColor: item.fontColor fontColor: item.fontColor
@ -201,9 +204,9 @@ ColumnLayout {
RowLayout { RowLayout {
id: inlineButtons id: inlineButtons
anchors.top: parent.top anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right anchors.right: parent.right
anchors.margins: 4 anchors.rightMargin: inputPaddingRight
spacing: 4 spacing: 4
} }
} }