Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/configuration/AppletConfiguration.qml
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 97 | } else { | |||
---|---|---|---|---|---|
99 | pageStack.title = globalConfigModel.get(0).name | 99 | pageStack.title = globalConfigModel.get(0).name | ||
100 | } | 100 | } | ||
101 | // root.width = pageStackColumn.implicitWidth | 101 | // root.width = pageStackColumn.implicitWidth | ||
102 | // root.height = pageStackColumn.implicitHeight | 102 | // root.height = pageStackColumn.implicitHeight | ||
103 | } | 103 | } | ||
104 | //END connections | 104 | //END connections | ||
105 | 105 | | |||
106 | //BEGIN UI components | 106 | //BEGIN UI components | ||
107 | Rectangle { | ||||
108 | id: sidebar | ||||
109 | anchors.left: root.left | ||||
110 | width: categories.width | ||||
111 | height: root.height | ||||
112 | color: Kirigami.Theme.viewBackgroundColor | ||||
113 | } | ||||
114 | | ||||
115 | Kirigami.Separator { | ||||
116 | anchors.left: sidebar.right | ||||
117 | height: root.height | ||||
118 | } | ||||
119 | | ||||
120 | Kirigami.Separator { | ||||
121 | anchors.top: root.top | ||||
122 | width: root.width | ||||
123 | } | ||||
124 | | ||||
107 | MessageDialog { | 125 | MessageDialog { | ||
108 | id: messageDialog | 126 | id: messageDialog | ||
109 | icon: StandardIcon.Warning | 127 | icon: StandardIcon.Warning | ||
110 | property Item delegate | 128 | property Item delegate | ||
111 | title: i18nd("plasma_shell_org.kde.plasma.desktop", "Apply Settings") | 129 | title: i18nd("plasma_shell_org.kde.plasma.desktop", "Apply Settings") | ||
112 | text: i18nd("plasma_shell_org.kde.plasma.desktop", "The settings of the current module have changed. Do you want to apply the changes or discard them?") | 130 | text: i18nd("plasma_shell_org.kde.plasma.desktop", "The settings of the current module have changed. Do you want to apply the changes or discard them?") | ||
113 | standardButtons: StandardButton.Apply | StandardButton.Discard | StandardButton.Cancel | 131 | standardButtons: StandardButton.Apply | StandardButton.Discard | StandardButton.Cancel | ||
114 | onApply: { | 132 | onApply: { | ||
115 | applyAction.trigger() | 133 | applyAction.trigger() | ||
116 | delegate.openCategory() | 134 | delegate.openCategory() | ||
117 | } | 135 | } | ||
118 | onDiscard: { | 136 | onDiscard: { | ||
119 | delegate.openCategory() | 137 | delegate.openCategory() | ||
120 | } | 138 | } | ||
121 | } | 139 | } | ||
122 | 140 | | |||
123 | ColumnLayout { | 141 | ColumnLayout { | ||
124 | id: pageStackColumn | 142 | id: pageStackColumn | ||
125 | anchors { | 143 | anchors { | ||
126 | fill: parent | 144 | fill: parent | ||
127 | margins: pageStackColumn.spacing * units.devicePixelRatio //margins are hardcoded in QStyle we should match that here | 145 | rightMargin: units.smallSpacing * 2 | ||
146 | bottomMargin: units.smallSpacing * 2 | ||||
128 | } | 147 | } | ||
129 | property int implicitWidth: Math.max(contentRow.implicitWidth, buttonsRow.implicitWidth) + 8 | 148 | property int implicitWidth: Math.max(contentRow.implicitWidth, buttonsRow.implicitWidth) + 8 | ||
130 | property int implicitHeight: contentRow.implicitHeight + buttonsRow.implicitHeight + 8 | 149 | property int implicitHeight: contentRow.implicitHeight + buttonsRow.implicitHeight + 8 | ||
131 | 150 | | |||
132 | RowLayout { | 151 | RowLayout { | ||
133 | id: contentRow | 152 | id: contentRow | ||
134 | spacing: 0 | 153 | spacing: 0 | ||
135 | Layout.fillWidth: true | 154 | Layout.fillWidth: true | ||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 210 | ColumnLayout { | |||
206 | Repeater { | 225 | Repeater { | ||
207 | model: !root.isContainment ? globalConfigModel : undefined | 226 | model: !root.isContainment ? globalConfigModel : undefined | ||
208 | delegate: ConfigCategoryDelegate {} | 227 | delegate: ConfigCategoryDelegate {} | ||
209 | } | 228 | } | ||
210 | } | 229 | } | ||
211 | } | 230 | } | ||
212 | } | 231 | } | ||
213 | 232 | | |||
214 | Rectangle { | | |||
215 | Layout.fillHeight: true | | |||
216 | width: Math.round(units.devicePixelRatio) | | |||
217 | color: Kirigami.Theme.highlightColor | | |||
218 | visible: categoriesScroll.visible | | |||
219 | opacity: categoriesScroll.activeFocus && Window.active ? 1 : 0.3 | | |||
220 | Behavior on color { | | |||
221 | ColorAnimation { | | |||
222 | duration: units.longDuration | | |||
223 | easing.type: Easing.InOutQuad | | |||
224 | } | | |||
225 | } | | |||
226 | } | | |||
227 | | ||||
228 | Item { // spacer | 233 | Item { // spacer | ||
229 | width: units.largeSpacing | 234 | width: units.smallSpacing * 2 | ||
230 | visible: categoriesScroll.visible | 235 | visible: categoriesScroll.visible | ||
231 | } | 236 | } | ||
232 | 237 | | |||
233 | QtControls.ScrollView { | 238 | QtControls.ScrollView { | ||
234 | id: scroll | 239 | id: scroll | ||
235 | Layout.fillHeight: true | 240 | Layout.fillHeight: true | ||
236 | Layout.fillWidth: true | 241 | Layout.fillWidth: true | ||
237 | // we want to focus the controls in the settings page right away, don't focus the ScrollView | 242 | // we want to focus the controls in the settings page right away, don't focus the ScrollView | ||
Show All 37 Lines | 277 | Flickable { | |||
275 | contentHeight: pageColumn.height | 280 | contentHeight: pageColumn.height | ||
276 | contentWidth: width | 281 | contentWidth: width | ||
277 | Column { | 282 | Column { | ||
278 | id: pageColumn | 283 | id: pageColumn | ||
279 | spacing: units.largeSpacing / 2 | 284 | spacing: units.largeSpacing / 2 | ||
280 | 285 | | |||
281 | Kirigami.Heading { | 286 | Kirigami.Heading { | ||
282 | id: pageTitle | 287 | id: pageTitle | ||
288 | topPadding: units.smallSpacing | ||||
283 | width: scroll.width | 289 | width: scroll.width | ||
284 | level: 1 | 290 | level: 1 | ||
285 | text: pageStack.title | 291 | text: pageStack.title | ||
286 | } | 292 | } | ||
287 | 293 | | |||
288 | QtControls.StackView { | 294 | QtControls.StackView { | ||
289 | id: pageStack | 295 | id: pageStack | ||
290 | property string title: "" | 296 | property string title: "" | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |