Highlight controls based on activeFocus, not focus

This commit is contained in:
Brad Davis 2016-06-30 15:16:28 -07:00
parent 7b0b56d793
commit 86f8b57841
2 changed files with 11 additions and 11 deletions

View file

@ -36,15 +36,15 @@ SpinBox {
id: spinStyle
background: Rectangle {
color: isLightColorScheme
? (spinBox.focus ? hifi.colors.white : hifi.colors.lightGray)
: (spinBox.focus ? hifi.colors.black : hifi.colors.baseGrayShadow)
? (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGray)
: (spinBox.activeFocus ? hifi.colors.black : hifi.colors.baseGrayShadow)
border.color: spinBoxLabelInside.visible ? spinBoxLabelInside.color : hifi.colors.primaryHighlight
border.width: spinBox.focus ? spinBoxLabelInside.visible ? 2 : 1 : 0
border.width: spinBox.activeFocus ? spinBoxLabelInside.visible ? 2 : 1 : 0
}
textColor: isLightColorScheme
? (spinBox.focus ? hifi.colors.black : hifi.colors.lightGray)
: (spinBox.focus ? hifi.colors.white : hifi.colors.lightGrayText)
? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.lightGray)
: (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText)
selectedTextColor: hifi.colors.black
selectionColor: hifi.colors.primaryHighlight
@ -96,7 +96,7 @@ SpinBox {
anchors.fill: parent
propagateComposedEvents: true
onWheel: {
if(spinBox.focus)
if(spinBox.activeFocus)
wheel.accepted = false
else
wheel.accepted = true

View file

@ -36,14 +36,14 @@ TextField {
style: TextFieldStyle {
textColor: isLightColorScheme
? (textField.focus ? hifi.colors.black : hifi.colors.lightGray)
: (textField.focus ? hifi.colors.white : hifi.colors.lightGrayText)
? (textField.activeFocus ? hifi.colors.black : hifi.colors.lightGray)
: (textField.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText)
background: Rectangle {
color: isLightColorScheme
? (textField.focus ? hifi.colors.white : hifi.colors.textFieldLightBackground)
: (textField.focus ? hifi.colors.black : hifi.colors.baseGrayShadow)
? (textField.activeFocus ? hifi.colors.white : hifi.colors.textFieldLightBackground)
: (textField.activeFocus ? hifi.colors.black : hifi.colors.baseGrayShadow)
border.color: hifi.colors.primaryHighlight
border.width: textField.focus ? 1 : 0
border.width: textField.activeFocus ? 1 : 0
radius: isSearchField ? textField.height / 2 : 0
HiFiGlyphs {