fix(StatusInput): Replaced layout spacing with margins (#808)
As part of https://github.com/status-im/status-desktop/issues/6022
This commit is contained in:
parent
767e7a7f5a
commit
a56893609e
|
@ -348,7 +348,9 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitWidth: 448
|
implicitWidth: 448
|
||||||
implicitHeight: (internal.inputHeight + topRow.height + errorMessage.height + (2*inputLayout.spacing))
|
implicitHeight: ((internal.inputHeight + topRow.height + errorMessage.height) +
|
||||||
|
((topRow.height > 0) && (errorMessage.height > 0) ? 16 :
|
||||||
|
(topRow.height > 0) || (errorMessage.height > 0) ? 8 : 0))
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
validate()
|
validate()
|
||||||
|
@ -357,7 +359,8 @@ Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: inputLayout
|
id: inputLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: ((topRow.height > 0) || (errorMessage.height > 0)) ? 8 : 0
|
spacing: 0
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: topRow
|
id: topRow
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -401,6 +404,8 @@ Item {
|
||||||
id: statusBaseInput
|
id: statusBaseInput
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
implicitHeight: internal.inputHeight
|
implicitHeight: internal.inputHeight
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Layout.topMargin: (topRow.height > 0) ? 8 : 0
|
||||||
maximumLength: root.charLimit
|
maximumLength: root.charLimit
|
||||||
onTextChanged: root.validate()
|
onTextChanged: root.validate()
|
||||||
Keys.forwardTo: [root]
|
Keys.forwardTo: [root]
|
||||||
|
@ -419,7 +424,8 @@ Item {
|
||||||
height: visible ? contentHeight : 0
|
height: visible ? contentHeight : 0
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: Theme.palette.dangerColor1
|
color: Theme.palette.dangerColor1
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Layout.topMargin: visible ? 8 : 0
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue