Changeset View
Changeset View
Standalone View
Standalone View
kcms/notifications/package/contents/ui/SourcesPage.qml
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 96 | ListView { | |||
---|---|---|---|---|---|
103 | highlightMoveDuration: 0 | 103 | highlightMoveDuration: 0 | ||
104 | 104 | | |||
105 | model: kcm.filteredModel | 105 | model: kcm.filteredModel | ||
106 | currentIndex: -1 | 106 | currentIndex: -1 | ||
107 | 107 | | |||
108 | section { | 108 | section { | ||
109 | criteria: ViewSection.FullString | 109 | criteria: ViewSection.FullString | ||
110 | property: "sourceType" | 110 | property: "sourceType" | ||
111 | delegate: QtControls.ItemDelegate { | 111 | delegate: Kirigami.AbstractListItem { | ||
112 | id: sourceSection | 112 | id: sourceSection | ||
113 | width: sourcesList.width | 113 | width: sourcesList.width | ||
114 | | ||||
115 | backgroundColor: Kirigami.Theme.backgroundColor | ||||
116 | Kirigami.Theme.inherit: false | ||||
117 | Kirigami.Theme.colorSet: Kirigami.Theme.Window | ||||
118 | | ||||
119 | hoverEnabled: false | ||||
120 | supportsMouseEvents: false | ||||
121 | | ||||
122 | Kirigami.Heading { | ||||
123 | level: 2 | ||||
114 | text: { | 124 | text: { | ||
115 | switch (Number(section)) { | 125 | switch (Number(section)) { | ||
116 | case Private.SourcesModel.ApplicationType: return i18n("Applications"); | 126 | case Private.SourcesModel.ApplicationType: return i18n("Applications"); | ||
117 | case Private.SourcesModel.ServiceType: return i18n("System Services"); | 127 | case Private.SourcesModel.ServiceType: return i18n("System Services"); | ||
118 | } | 128 | } | ||
119 | } | 129 | } | ||
120 | | ||||
121 | // unset "disabled" text color... | | |||
122 | contentItem: QtControls.Label { | | |||
123 | text: sourceSection.text | | |||
124 | // FIXME why does none of this work :( | | |||
125 | //Kirigami.Theme.colorGroup: Kirigami.Theme.Active | | |||
126 | //color: Kirigami.Theme.textColor | | |||
127 | color: rootRow.Kirigami.Theme.textColor | | |||
128 | elide: Text.ElideRight | | |||
129 | verticalAlignment: Text.AlignVCenter | | |||
130 | } | 130 | } | ||
131 | enabled: false | | |||
132 | } | 131 | } | ||
133 | } | 132 | } | ||
134 | 133 | | |||
135 | // We need to manually keep track of the index when we filter | 134 | // We need to manually keep track of the index when we filter | ||
136 | function updateCurrentIndex() { | 135 | function updateCurrentIndex() { | ||
137 | if (!appConfiguration.rootIndex || !appConfiguration.rootIndex.valid) { | 136 | if (!appConfiguration.rootIndex || !appConfiguration.rootIndex.valid) { | ||
138 | currentIndex = -1; | 137 | currentIndex = -1; | ||
139 | return; | 138 | return; | ||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |