Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions panels/notification/center/GroupNotify.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ NotifyItem {
id: root
implicitWidth: impl.implicitWidth
implicitHeight: impl.implicitHeight
property bool focusedByNavigation: false
onActiveFocusChanged: if (!activeFocus) focusedByNavigation = false

signal collapse()
signal gotoNextItem() // Signal to navigate to next notify item
Expand Down
5 changes: 4 additions & 1 deletion panels/notification/center/NormalNotify.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ NotifyItem {
implicitWidth: impl.implicitWidth
implicitHeight: impl.implicitHeight

property bool focusedByNavigation: false
onActiveFocusChanged: if (!activeFocus) focusedByNavigation = false
Comment thread
wjyrich marked this conversation as resolved.

signal gotoNextItem()
signal gotoPrevItem()

Expand Down Expand Up @@ -59,7 +62,7 @@ NotifyItem {
actions: root.actions
defaultAction: root.defaultAction
// Show close button when: mouse hovers, or item has focus from keyboard navigation
parentHovered: impl.hovered || root.activeFocus
parentHovered: impl.hovered || (root.activeFocus && root.focusedByNavigation)
strongInteractive: root.strongInteractive
contentIcon: root.contentIcon
contentRowCount: root.contentRowCount
Expand Down
1 change: 1 addition & 0 deletions panels/notification/center/NotifyView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Control {
function tryFocus(retries) {
let item = view.itemAtIndex(idx)
if (item && item.enabled) {
item.focusedByNavigation = true
item.resetFocus()
if (!item.focusFirstButton()) {
item.forceActiveFocus()
Expand Down
2 changes: 2 additions & 0 deletions panels/notification/center/NotifyViewDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ DelegateChooser {
Qt.callLater(function() {
let nextItem = view.itemAtIndex(currentIndex + 1)
if (nextItem && nextItem.enabled) {
nextItem.focusedByNavigation = true
nextItem.resetFocus()
nextItem.forceActiveFocus()
Comment thread
wjyrich marked this conversation as resolved.
}
Expand All @@ -43,6 +44,7 @@ DelegateChooser {
Qt.callLater(function() {
let prevItem = view.itemAtIndex(currentIndex - 1)
if (prevItem && prevItem.enabled) {
prevItem.focusedByNavigation = true
prevItem.forceActiveFocus()
}
})
Expand Down
5 changes: 4 additions & 1 deletion panels/notification/center/OverlapNotify.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ NotifyItem {
property var removedCallback
property alias notifyContent: notifyContent

property bool focusedByNavigation: false
onActiveFocusChanged: if (!activeFocus) focusedByNavigation = false

signal expand()
signal gotoNextItem()
signal gotoPrevItem()
Expand Down Expand Up @@ -107,7 +110,7 @@ NotifyItem {
actions: root.actions
defaultAction: root.defaultAction
// Show close button when: mouse hovers, or item has focus from keyboard navigation
parentHovered: impl.hovered || root.activeFocus
parentHovered: impl.hovered || (root.activeFocus && root.focusedByNavigation)
strongInteractive: root.strongInteractive
contentIcon: root.contentIcon
contentRowCount: root.contentRowCount
Expand Down
Loading