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 | visible: configDialog.configModel | ||||
110 | anchors.left: root.left | ||||
111 | width: categories.width | ||||
112 | height: root.height | ||||
113 | color: Kirigami.Theme.viewBackgroundColor | ||||
114 | } | ||||
115 | | ||||
116 | Kirigami.Separator { | ||||
117 | visible: configDialog.configModel | ||||
118 | anchors.left: sidebar.right | ||||
119 | height: root.height | ||||
120 | } | ||||
121 | | ||||
122 | Kirigami.Separator { | ||||
123 | anchors.top: root.top | ||||
124 | width: root.width | ||||
125 | } | ||||
126 | | ||||
107 | MessageDialog { | 127 | MessageDialog { | ||
108 | id: messageDialog | 128 | id: messageDialog | ||
109 | icon: StandardIcon.Warning | 129 | icon: StandardIcon.Warning | ||
110 | property Item delegate | 130 | property Item delegate | ||
111 | title: i18nd("plasma_shell_org.kde.plasma.desktop", "Apply Settings") | 131 | 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?") | 132 | 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 | 133 | standardButtons: StandardButton.Apply | StandardButton.Discard | StandardButton.Cancel | ||
114 | onApply: { | 134 | onApply: { | ||
115 | applyAction.trigger() | 135 | applyAction.trigger() | ||
116 | delegate.openCategory() | 136 | delegate.openCategory() | ||
117 | } | 137 | } | ||
118 | onDiscard: { | 138 | onDiscard: { | ||
119 | delegate.openCategory() | 139 | delegate.openCategory() | ||
120 | } | 140 | } | ||
121 | } | 141 | } | ||
122 | 142 | | |||
123 | ColumnLayout { | 143 | ColumnLayout { | ||
124 | id: pageStackColumn | 144 | id: pageStackColumn | ||
125 | anchors { | 145 | anchors { | ||
126 | fill: parent | 146 | fill: parent | ||
127 | margins: pageStackColumn.spacing * units.devicePixelRatio //margins are hardcoded in QStyle we should match that here | 147 | rightMargin: units.smallSpacing * 2 | ||
148 | leftMargin: configDialog.configModel ? 0 : units.smallSpacing * 2 | ||||
149 | bottomMargin: units.smallSpacing * 2 | ||||
128 | } | 150 | } | ||
129 | property int implicitWidth: Math.max(contentRow.implicitWidth, buttonsRow.implicitWidth) + 8 | 151 | property int implicitWidth: Math.max(contentRow.implicitWidth, buttonsRow.implicitWidth) + 8 | ||
130 | property int implicitHeight: contentRow.implicitHeight + buttonsRow.implicitHeight + 8 | 152 | property int implicitHeight: contentRow.implicitHeight + buttonsRow.implicitHeight + 8 | ||
131 | 153 | | |||
132 | RowLayout { | 154 | RowLayout { | ||
133 | id: contentRow | 155 | id: contentRow | ||
134 | spacing: 0 | 156 | spacing: 0 | ||
135 | Layout.fillWidth: true | 157 | Layout.fillWidth: true | ||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 213 | ColumnLayout { | |||
206 | Repeater { | 228 | Repeater { | ||
207 | model: !root.isContainment ? globalConfigModel : undefined | 229 | model: !root.isContainment ? globalConfigModel : undefined | ||
208 | delegate: ConfigCategoryDelegate {} | 230 | delegate: ConfigCategoryDelegate {} | ||
209 | } | 231 | } | ||
210 | } | 232 | } | ||
211 | } | 233 | } | ||
212 | } | 234 | } | ||
213 | 235 | | |||
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 | 236 | Item { // spacer | ||
229 | width: units.largeSpacing | 237 | width: units.smallSpacing * 2 | ||
230 | visible: categoriesScroll.visible | 238 | visible: categoriesScroll.visible | ||
231 | } | 239 | } | ||
232 | 240 | | |||
233 | QtControls.ScrollView { | 241 | QtControls.ScrollView { | ||
234 | id: scroll | 242 | id: scroll | ||
235 | Layout.fillHeight: true | 243 | Layout.fillHeight: true | ||
236 | Layout.fillWidth: true | 244 | Layout.fillWidth: true | ||
237 | // we want to focus the controls in the settings page right away, don't focus the ScrollView | 245 | // we want to focus the controls in the settings page right away, don't focus the ScrollView | ||
Show All 37 Lines | 280 | Flickable { | |||
275 | contentHeight: pageColumn.height | 283 | contentHeight: pageColumn.height | ||
276 | contentWidth: width | 284 | contentWidth: width | ||
277 | Column { | 285 | Column { | ||
278 | id: pageColumn | 286 | id: pageColumn | ||
279 | spacing: units.largeSpacing / 2 | 287 | spacing: units.largeSpacing / 2 | ||
280 | 288 | | |||
281 | Kirigami.Heading { | 289 | Kirigami.Heading { | ||
282 | id: pageTitle | 290 | id: pageTitle | ||
291 | topPadding: units.smallSpacing | ||||
283 | width: scroll.width | 292 | width: scroll.width | ||
284 | level: 1 | 293 | level: 1 | ||
285 | text: pageStack.title | 294 | text: pageStack.title | ||
286 | } | 295 | } | ||
287 | 296 | | |||
288 | QtControls.StackView { | 297 | QtControls.StackView { | ||
289 | id: pageStack | 298 | id: pageStack | ||
290 | property string title: "" | 299 | property string title: "" | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |