Merge pull request from ElderOrb/FB16840

FB16840 - Qml spinboxes in UI toolkit should focus the underlying fie…
This commit is contained in:
John Conklin II 2018-08-01 11:46:59 -07:00 committed by GitHub
commit 082a3bca89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,11 @@ SpinBox {
color: spinBox.up.pressed || spinBox.up.hovered ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray
}
}
up.onPressedChanged: {
if(value) {
spinBox.forceActiveFocus();
}
}
down.indicator: Item {
x: spinBox.width - implicitWidth - 5
@ -138,6 +143,11 @@ SpinBox {
color: spinBox.down.pressed || spinBox.down.hovered ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray
}
}
down.onPressedChanged: {
if(value) {
spinBox.forceActiveFocus();
}
}
HifiControls.Label {
id: spinBoxLabel