qml: styling Pin dialog, fix size glitching
This commit is contained in:
@@ -19,7 +19,7 @@ ElDialog {
|
|||||||
property string _pin
|
property string _pin
|
||||||
|
|
||||||
title: authMessage ? authMessage : qsTr('PIN')
|
title: authMessage ? authMessage : qsTr('PIN')
|
||||||
iconSource: '../../../icons/lock.png'
|
iconSource: Qt.resolvedUrl('../../icons/lock.png')
|
||||||
width: parent.width * 3/4
|
width: parent.width * 3/4
|
||||||
z: 1000
|
z: 1000
|
||||||
focus: true
|
focus: true
|
||||||
@@ -72,17 +72,21 @@ ElDialog {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: [qsTr('Enter PIN'), qsTr('Enter New PIN'), qsTr('Re-enter New PIN')][_phase]
|
text: [qsTr('Enter PIN'), qsTr('Enter New PIN'), qsTr('Re-enter New PIN')][_phase]
|
||||||
font.pixelSize: constants.fontSizeXXLarge
|
font.pixelSize: constants.fontSizeXLarge
|
||||||
Layout.alignment: Qt.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: pin
|
id: pin
|
||||||
Layout.preferredWidth: fontMetrics.advanceWidth(passwordCharacter) * 6
|
Layout.preferredWidth: fontMetrics.advanceWidth(passwordCharacter) * 6 + pin.leftPadding + pin.rightPadding
|
||||||
|
Layout.preferredHeight: fontMetrics.height + pin.topPadding + pin.bottomPadding
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
font.pixelSize: constants.fontSizeXXLarge
|
font.pixelSize: constants.fontSizeXXLarge
|
||||||
maximumLength: 6
|
maximumLength: 6
|
||||||
inputMethodHints: Qt.ImhDigitsOnly
|
inputMethodHints: Qt.ImhDigitsOnly
|
||||||
|
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
focus: true
|
focus: true
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
|
|||||||
Reference in New Issue
Block a user