FB16840 - Qml spinboxes in UI toolkit should focus the underlying field when clicked on

This commit is contained in:
Alexander Ivash 2018-07-24 23:02:06 +03:00
parent b7d12c6b1c
commit dfb20c4afc

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