mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
StatusBar: port away from statusnotifieritem dataengine
Task: https://phabricator.kde.org/T13319
This commit is contained in:
parent
c004467db3
commit
843977059b
1 changed files with 3 additions and 18 deletions
|
|
@ -16,6 +16,7 @@ import org.kde.kirigami as Kirigami
|
|||
|
||||
import org.kde.plasma.core as PlasmaCore
|
||||
import org.kde.plasma.plasma5support 2.0 as P5Support
|
||||
import org.kde.plasma.private.systemtray as SystemTray
|
||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||
import org.kde.kitemmodels as KItemModels
|
||||
import org.kde.plasma.private.mobileshell as MobileShell
|
||||
|
|
@ -67,17 +68,7 @@ Item {
|
|||
Loader {
|
||||
id: statusNotifierSourceLoader
|
||||
active: !disableSystemTray
|
||||
sourceComponent: P5Support.DataSource {
|
||||
id: statusNotifierSource
|
||||
engine: "statusnotifieritem"
|
||||
interval: 0
|
||||
onSourceAdded: {
|
||||
connectSource(source)
|
||||
}
|
||||
Component.onCompleted: {
|
||||
connectedSources = sources
|
||||
}
|
||||
}
|
||||
sourceComponent: SystemTray.StatusNotifierModel { }
|
||||
}
|
||||
|
||||
// drop shadow for icons
|
||||
|
|
@ -141,13 +132,7 @@ Item {
|
|||
// system tray
|
||||
Repeater {
|
||||
id: statusNotifierRepeater
|
||||
model: KItemModels.KSortFilterProxyModel {
|
||||
id: filteredStatusNotifiers
|
||||
filterRoleName: "Title"
|
||||
sourceModel: P5Support.DataModel {
|
||||
dataSource: statusNotifierSource ? statusNotifierSource : null
|
||||
}
|
||||
}
|
||||
model: root.statusNotifierSource
|
||||
|
||||
delegate: TaskWidget {
|
||||
Layout.leftMargin: root.elementSpacing
|
||||
|
|
|
|||
Loading…
Reference in a new issue