-
Notifications
You must be signed in to change notification settings - Fork 2
Remove 1 sec settings write, add deselect[CPP-597] #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok - I have some recommendations now.
- Remove your
MouseArea
that covers the entirety of theSettingsPane
- Replace with
MouseArea
in theLabel
s. - Use
forceActiveFocus()
instead of settingfocus
tofalse
- as something should always haveactiveFocus
, and I'm not sure what would haveactiveFocus
if you just set thefocus
tofalse
. - Remove
textFieldFocus
property you created, since it will no longer be used.
resources/SettingsTab.qml
Outdated
|
||
MouseArea { | ||
anchors.fill: parent | ||
onPressed: { | ||
mouse.accepted = false; | ||
if (settingsPane.textFieldFocus.focus) | ||
settingsPane.textFieldFocus.focus = false; | ||
|
||
} | ||
onClicked: mouse.accepted = false | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
Instead we will put MouseArea
on the Label
s. in SettingsPane
.
Inside of each Label
(inside of settingRowLabel and settingRowText) put the following MouseArea
:
MouseArea {
anchors.fill: parent
onClicked: parent.forceActiveFocus();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keithel-qt Would you have a better suggestion for checking when our "textField" loaded component should lose focus by clicking away from the textField? Seems like the entire app would need to be wrapped in a mousearea with this approach I'm taking.
Screen.Recording.2022-01-20.at.7.16.46.PM.mov