Verified Commit 77a58a1d authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/notifications: set focus and remove forceActiveFocus hack

parent 294c9265
Pipeline #220527 passed with stage
in 11 minutes and 59 seconds
......@@ -37,12 +37,7 @@ PlasmaExtras.Representation {
collapseMarginsHint: true
// HACK forward focus to the list
onActiveFocusChanged: {
if (activeFocus) {
list.forceActiveFocus();
}
}
Keys.onDownPressed: dndCheck.forceActiveFocus(Qt.TabFocusReason);
Connections {
target: Plasmoid.self
......@@ -80,6 +75,9 @@ PlasmaExtras.Representation {
checkable: true
checked: Globals.inhibited
KeyNavigation.down: list
KeyNavigation.tab: list
// Let the menu open on press
onPressed: {
if (!Globals.inhibited) {
......@@ -237,11 +235,13 @@ PlasmaExtras.Representation {
id: scrollView
anchors.fill: parent
background: null
focus: true
// HACK: workaround for https://bugreports.qt.io/browse/QTBUG-83890
PlasmaComponents3.ScrollBar.horizontal.policy: PlasmaComponents3.ScrollBar.AlwaysOff
contentItem: ListView {
id: list
focus: true
model: historyModel
currentIndex: -1
......@@ -251,6 +251,8 @@ PlasmaExtras.Representation {
rightMargin: PlasmaCore.Units.smallSpacing * 2
spacing: PlasmaCore.Units.smallSpacing
KeyNavigation.up: dndCheck
Keys.onDeletePressed: {
var idx = historyModel.index(currentIndex, 0);
if (historyModel.data(idx, NotificationManager.Notifications.ClosableRole)) {
......
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