UI NumericalEdit: tweak marings
This commit is contained in:
parent
87d2b03b71
commit
ca103e7fce
1 changed files with 7 additions and 1 deletions
|
@ -11,6 +11,8 @@ FocusScope {
|
||||||
property bool live: false
|
property bool live: false
|
||||||
property alias unitsMode: units.mode
|
property alias unitsMode: units.mode
|
||||||
|
|
||||||
|
readonly property int microPadding: 2
|
||||||
|
|
||||||
UnitsModel {
|
UnitsModel {
|
||||||
id: units
|
id: units
|
||||||
}
|
}
|
||||||
|
@ -185,7 +187,7 @@ FocusScope {
|
||||||
anchors.margins: Style.margin
|
anchors.margins: Style.margin
|
||||||
|
|
||||||
height: edit.implicitHeight + Style.margin
|
height: edit.implicitHeight + Style.margin
|
||||||
width: edit.width + prefix.width + suffix.width + upDownArea.width + Style.margin * 2
|
width: edit.width + prefix.width + suffix.width + upDownArea.width + Style.margin * 2 + (microPadding * 2)
|
||||||
radius: Style.roundRadius
|
radius: Style.roundRadius
|
||||||
border.color: root.enable ? (edit.activeFocus ? Style.frameColor : Style.minorFrameColor) : Style.disabledMinorFrameColor
|
border.color: root.enable ? (edit.activeFocus ? Style.frameColor : Style.minorFrameColor) : Style.disabledMinorFrameColor
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
@ -207,6 +209,8 @@ FocusScope {
|
||||||
enabled: root.enabled
|
enabled: root.enabled
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: prefix.right
|
anchors.left: prefix.right
|
||||||
|
anchors.leftMargin: microPadding
|
||||||
|
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
width: metrics.width
|
width: metrics.width
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
|
@ -252,6 +256,8 @@ FocusScope {
|
||||||
enabled: root.enabled
|
enabled: root.enabled
|
||||||
anchors.baseline: edit.baseline
|
anchors.baseline: edit.baseline
|
||||||
anchors.right: upDownArea.left
|
anchors.right: upDownArea.left
|
||||||
|
anchors.rightMargin: microPadding
|
||||||
|
|
||||||
text: visible ? units.shortText : ""
|
text: visible ? units.shortText : ""
|
||||||
onClicked: root.showUnitsMenu();
|
onClicked: root.showUnitsMenu();
|
||||||
clickable: (units.numChoices > 1)
|
clickable: (units.numChoices > 1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue