mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-02-16 10:40:59 +00:00
Fix focus issues after dismissal of consecutive dialogs (like Add PC -> Add PC error)
This commit is contained in:
@@ -7,11 +7,16 @@ import SystemProperties 1.0
|
||||
NavigableDialog {
|
||||
id: dialog
|
||||
|
||||
property alias text: dialogTextControl.dialogText
|
||||
property alias text: dialogLabel.dialogText
|
||||
|
||||
property string helpText
|
||||
property string helpUrl : "https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting"
|
||||
|
||||
onOpened: {
|
||||
// Force keyboard focus on the label so keyboard navigation works
|
||||
dialogLabel.forceActiveFocus()
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
|
||||
@@ -29,10 +34,9 @@ NavigableDialog {
|
||||
Label {
|
||||
property string dialogText
|
||||
|
||||
id: dialogTextControl
|
||||
id: dialogLabel
|
||||
text: dialogText + (SystemProperties.hasBrowser ? (" " + helpText) : "")
|
||||
wrapMode: Text.WordWrap
|
||||
focus: true
|
||||
|
||||
// Cap the width so the dialog doesn't grow horizontally forever. This
|
||||
// will cause word wrap to kick in.
|
||||
|
||||
Reference in New Issue
Block a user