Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwineffects/package/contents/ui/Effect.qml
Show All 16 Lines | |||||
17 | * | 17 | * | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.1 | 20 | import QtQuick 2.1 | ||
21 | import QtQuick.Controls 2.5 as QtControls | 21 | import QtQuick.Controls 2.5 as QtControls | ||
22 | import QtQuick.Layouts 1.0 | 22 | import QtQuick.Layouts 1.0 | ||
23 | import org.kde.kirigami 2.5 as Kirigami | 23 | import org.kde.kirigami 2.5 as Kirigami | ||
24 | 24 | | |||
25 | Rectangle { | 25 | Kirigami.SwipeListItem { | ||
26 | height: row.implicitHeight | 26 | alternatingBackground: true | ||
27 | 27 | contentItem: RowLayout { | |||
28 | Kirigami.Theme.inherit: false | | |||
29 | Kirigami.Theme.colorSet: Kirigami.Theme.View | | |||
30 | color: index % 2 ? Kirigami.Theme.backgroundColor : palette.alternateBase | | |||
31 | | ||||
32 | RowLayout { | | |||
33 | id: row | 28 | id: row | ||
34 | | ||||
35 | x: spacing | | |||
36 | width: parent.width - 2 * spacing | | |||
37 | | ||||
38 | QtControls.RadioButton { | 29 | QtControls.RadioButton { | ||
39 | property bool _exclusive: model.ExclusiveRole != "" | 30 | property bool _exclusive: model.ExclusiveRole != "" | ||
40 | property bool _toggled: false | 31 | property bool _toggled: false | ||
41 | 32 | | |||
42 | checked: model.StatusRole | 33 | checked: model.StatusRole | ||
43 | visible: _exclusive | 34 | visible: _exclusive | ||
44 | QtControls.ButtonGroup.group: _exclusive ? effectsList.findButtonGroup(model.ExclusiveRole) : null | 35 | QtControls.ButtonGroup.group: _exclusive ? effectsList.findButtonGroup(model.ExclusiveRole) : null | ||
45 | 36 | | |||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | |||||
125 | } | 116 | } | ||
126 | 117 | | |||
127 | QtControls.Button { | 118 | QtControls.Button { | ||
128 | icon.name: "dialog-information" | 119 | icon.name: "dialog-information" | ||
129 | 120 | | |||
130 | onClicked: aboutItem.visible = !aboutItem.visible; | 121 | onClicked: aboutItem.visible = !aboutItem.visible; | ||
131 | } | 122 | } | ||
132 | } | 123 | } | ||
133 | | ||||
134 | // Kirigami.Theme doesn't provide alternate color. | | |||
135 | SystemPalette { | | |||
136 | id: palette | | |||
137 | | ||||
138 | colorGroup: SystemPalette.Active | | |||
139 | } | | |||
140 | } | 124 | } |