fix(StatusBaseInput): some minor style adjustment to adhere to design
This commit is contained in:
parent
fca3386cec
commit
97a5c33e6f
|
@ -34,8 +34,8 @@ Item {
|
||||||
|
|
||||||
property real leftPadding: 16
|
property real leftPadding: 16
|
||||||
property real rightPadding: 16
|
property real rightPadding: 16
|
||||||
property real topPadding: 11
|
property real topPadding: 12
|
||||||
property real bottomPadding: 11
|
property real bottomPadding: 12
|
||||||
|
|
||||||
property real minimumHeight: 0
|
property real minimumHeight: 0
|
||||||
property real maximumHeight: 0
|
property real maximumHeight: 0
|
||||||
|
@ -43,7 +43,7 @@ Item {
|
||||||
property bool valid: true
|
property bool valid: true
|
||||||
|
|
||||||
implicitWidth: 448
|
implicitWidth: 448
|
||||||
implicitHeight: multiline ? Math.max(edit.implicitHeight + topPadding + bottomPadding, 40) : 40
|
implicitHeight: multiline ? Math.max(edit.implicitHeight + topPadding + bottomPadding, 44) : 44
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@ -139,6 +139,7 @@ Item {
|
||||||
visible: edit.text.length === 0
|
visible: edit.text.length === 0
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
|
|
||||||
elide: StatusBaseText.ElideRight
|
elide: StatusBaseText.ElideRight
|
||||||
|
|
|
@ -35,7 +35,10 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.topMargin: visible ? 8 : 0
|
anchors.topMargin: visible ? 8 : 0
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
|
anchors.right: charLimitLabel.visible ? charLimitLabel.left : parent.right
|
||||||
|
anchors.rightMargin: 16
|
||||||
visible: !!root.label
|
visible: !!root.label
|
||||||
|
elide: Text.ElideRight
|
||||||
|
|
||||||
text: root.label
|
text: root.label
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
|
@ -49,9 +52,9 @@ Rectangle {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: visible ? 11 : 0
|
anchors.topMargin: visible ? 11 : 0
|
||||||
anchors.rightMargin: 16
|
anchors.rightMargin: 16
|
||||||
visible: !!root.charLimit
|
visible: root.charLimit > 0
|
||||||
|
|
||||||
text: "0 / " + root.charLimit
|
text: "%1 / %2".arg(statusBaseInput.text.length).arg(root.charLimit)
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: statusBaseInput.enabled ? Theme.palette.baseColor1 : Theme.palette.directColor6
|
color: statusBaseInput.enabled ? Theme.palette.baseColor1 : Theme.palette.directColor6
|
||||||
}
|
}
|
||||||
|
@ -74,6 +77,8 @@ Rectangle {
|
||||||
anchors.topMargin: 11
|
anchors.topMargin: 11
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 16
|
anchors.rightMargin: 16
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 16
|
||||||
|
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
visible: !!root.errorMessage && !statusBaseInput.valid
|
visible: !!root.errorMessage && !statusBaseInput.valid
|
||||||
|
@ -81,5 +86,7 @@ Rectangle {
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: Theme.palette.dangerColor1
|
color: Theme.palette.dangerColor1
|
||||||
text: root.errorMessage
|
text: root.errorMessage
|
||||||
|
horizontalAlignment: Text.AlignRight
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue