Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwineffects/package/contents/ui/main.qml
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 30 | header: ColumnLayout { | |||
---|---|---|---|---|---|
81 | } | 81 | } | ||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | view: ListView { | 84 | view: ListView { | ||
85 | id: effectsList | 85 | id: effectsList | ||
86 | 86 | | |||
87 | property var _buttonGroups: [] | 87 | property var _buttonGroups: [] | ||
88 | 88 | | |||
89 | spacing: Kirigami.Units.smallSpacing | | |||
90 | | ||||
91 | model: Private.EffectsFilterProxyModel { | 89 | model: Private.EffectsFilterProxyModel { | ||
92 | id: searchModel | 90 | id: searchModel | ||
93 | 91 | | |||
94 | query: searchField.text | 92 | query: searchField.text | ||
95 | sourceModel: kcm.effectsModel | 93 | sourceModel: kcm.effectsModel | ||
96 | } | 94 | } | ||
97 | 95 | | |||
98 | delegate: Effect { | 96 | delegate: Effect { | ||
99 | width: effectsList.width | 97 | width: effectsList.width | ||
100 | } | 98 | } | ||
101 | 99 | | |||
102 | section.property: "CategoryRole" | 100 | section.property: "CategoryRole" | ||
103 | section.delegate: Item { | 101 | section.delegate:Kirigami.AbstractListItem { | ||
104 | width: effectsList.width | 102 | width: effectsList.width | ||
105 | height: sectionText.implicitHeight + 2 * Kirigami.Units.smallSpacing | | |||
106 | 103 | | |||
107 | QtControls.Label { | 104 | backgroundColor: Kirigami.Theme.backgroundColor | ||
108 | id: sectionText | 105 | Kirigami.Theme.inherit: false | ||
106 | Kirigami.Theme.colorSet: Kirigami.Theme.Window | ||||
109 | 107 | | |||
110 | anchors.fill: parent | 108 | hoverEnabled: false | ||
109 | supportsMouseEvents: false | ||||
111 | 110 | | |||
112 | color: Kirigami.Theme.disabledTextColor | 111 | QtControls.Label { | ||
113 | font.weight: Font.Bold | | |||
114 | horizontalAlignment: Text.AlignHCenter | | |||
115 | text: section | 112 | text: section | ||
116 | verticalAlignment: Text.AlignVCenter | | |||
117 | } | 113 | } | ||
118 | } | 114 | } | ||
119 | 115 | | |||
120 | function findButtonGroup(name) { | 116 | function findButtonGroup(name) { | ||
121 | for (let item of effectsList._buttonGroups) { | 117 | for (let item of effectsList._buttonGroups) { | ||
122 | if (item.name == name) { | 118 | if (item.name == name) { | ||
123 | return item.group; | 119 | return item.group; | ||
124 | } | 120 | } | ||
Show All 30 Lines |