Commit 40e4e5f2 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/systemtray: add default KeyNavigation properties to container

This allows better support for arrow key navigation in applets.
parent bfd9d6dc
Pipeline #222775 passed with stage
in 6 minutes and 17 seconds
......@@ -217,6 +217,9 @@ Item {
// We need to add margin on the top so it matches the dialog's own margin
Layout.topMargin: mergeHeadings ? 0 : dialog.margins.top
KeyNavigation.up: pinButton
KeyNavigation.backtab: pinButton
onVisibleChanged: {
if (visible) {
forceActiveFocus();
......
......@@ -68,6 +68,8 @@ StackView {
"width": Qt.binding(() => mainStack.width),
"height": Qt.binding(() => mainStack.height),
"focus": true,
"KeyNavigation.up": mainStack.KeyNavigation.up,
"KeyNavigation.backtab": mainStack.KeyNavigation.backtab,
}, systemTrayState.expanded ? (unFlipped ? StackView.PushTransition : StackView.PopTransition) : StackView.Immediate);
} else {
mainStack.clear();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment