Changeset View
Changeset View
Standalone View
Standalone View
kcms/icons/package/contents/ui/main.qml
Show All 29 Lines | |||||
30 | 30 | | |||
31 | import org.kde.private.kcms.icons 1.0 as Private | 31 | import org.kde.private.kcms.icons 1.0 as Private | ||
32 | 32 | | |||
33 | KCM.GridViewKCM { | 33 | KCM.GridViewKCM { | ||
34 | KCM.ConfigModule.quickHelp: i18n("This module allows you to choose the icons for your desktop.") | 34 | KCM.ConfigModule.quickHelp: i18n("This module allows you to choose the icons for your desktop.") | ||
35 | 35 | | |||
36 | view.model: kcm.iconsModel | 36 | view.model: kcm.iconsModel | ||
37 | view.currentIndex: kcm.pluginIndex(kcm.iconsSettings.theme) | 37 | view.currentIndex: kcm.pluginIndex(kcm.iconsSettings.theme) | ||
38 | enabled: !kcm.downloadingFile | 38 | enabled: !kcm.downloadingFile | ||
broulik: Why this change? | |||||
bport: my bad, need to keep the downloaded stuff there | |||||
39 | view.enabled: !kcm.iconsSettings.isImmutable("Theme") | ||||
39 | 40 | | |||
40 | DropArea { | 41 | DropArea { | ||
42 | enabled: !kcm.iconsSettings.isImmutable("Theme") | ||||
41 | anchors.fill: parent | 43 | anchors.fill: parent | ||
42 | onEntered: { | 44 | onEntered: { | ||
43 | if (!drag.hasUrls) { | 45 | if (!drag.hasUrls) { | ||
44 | drag.accepted = false; | 46 | drag.accepted = false; | ||
45 | } | 47 | } | ||
46 | } | 48 | } | ||
47 | onDropped: kcm.installThemeFromFile(drop.urls[0]) | 49 | onDropped: kcm.installThemeFromFile(drop.urls[0]) | ||
48 | } | 50 | } | ||
49 | 51 | | |||
50 | view.delegate: KCM.GridDelegate { | 52 | view.delegate: KCM.GridDelegate { | ||
51 | id: delegate | 53 | id: delegate | ||
52 | 54 | | |||
53 | text: model.display | 55 | text: model.display | ||
54 | toolTip: model.description | 56 | toolTip: model.description | ||
55 | 57 | | |||
56 | thumbnailAvailable: typeof thumbFlow.previews === "undefined" || thumbFlow.previews.length > 0 | 58 | thumbnailAvailable: typeof thumbFlow.previews === "undefined" || thumbFlow.previews.length > 0 | ||
Shouldn't this be set on the grid view then, i.e. the view.enabled stuff Marco fixed a while back? broulik: Shouldn't this be set on the grid view then, i.e. the `view.enabled` stuff Marco fixed a while… | |||||
crossi: Yes it should. | |||||
Problem with this solution it will disable also icon size components, and we don't want that, if you have a nicer solution bport: Problem with this solution it will disable also icon size components, and we don't want that… | |||||
bport: my bad missread indeed view.enabled do what I want | |||||
57 | thumbnail: MouseArea { | 59 | thumbnail: MouseArea { | ||
58 | id: thumbArea | 60 | id: thumbArea | ||
59 | 61 | | |||
60 | anchors.fill: parent | 62 | anchors.fill: parent | ||
61 | acceptedButtons: Qt.NoButton | 63 | acceptedButtons: Qt.NoButton | ||
62 | hoverEnabled: true | 64 | hoverEnabled: true | ||
63 | clip: thumbFlow.y < 0 | 65 | clip: thumbFlow.y < 0 | ||
64 | 66 | | |||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | 213 | Connections { | |||
221 | } | 223 | } | ||
222 | } | 224 | } | ||
223 | } | 225 | } | ||
224 | 226 | | |||
225 | RowLayout { | 227 | RowLayout { | ||
226 | Layout.fillWidth: true | 228 | Layout.fillWidth: true | ||
227 | 229 | | |||
228 | QtControls.Button { | 230 | QtControls.Button { | ||
229 | id: iconSizesButton | 231 | id: iconSizesButton | ||
broulik: This is the default | |||||
230 | text: i18n("Configure Icon Sizes") | 232 | text: i18n("Configure Icon Sizes") | ||
231 | icon.name: "transform-scale" // proper icon? | 233 | icon.name: "transform-scale" // proper icon? | ||
232 | checkable: true | 234 | checkable: true | ||
233 | checked: iconSizePopupLoader.item && iconSizePopupLoader.item.opened | 235 | checked: iconSizePopupLoader.item && iconSizePopupLoader.item.opened | ||
234 | onClicked: { | 236 | onClicked: { | ||
235 | iconSizePopupLoader.active = true; | 237 | iconSizePopupLoader.active = true; | ||
236 | iconSizePopupLoader.item.open(); | 238 | iconSizePopupLoader.item.open(); | ||
237 | } | 239 | } | ||
238 | } | 240 | } | ||
239 | 241 | | |||
240 | Item { | 242 | Item { | ||
241 | Layout.fillWidth: true | 243 | Layout.fillWidth: true | ||
242 | } | 244 | } | ||
243 | 245 | | |||
244 | QtControls.Button { | 246 | QtControls.Button { | ||
247 | enabled: !kcm.iconsSettings.isImmutable("Theme") | ||||
245 | id: installFromFileButton | 248 | id: installFromFileButton | ||
246 | text: i18n("Install from File...") | 249 | text: i18n("Install from File...") | ||
247 | icon.name: "document-import" | 250 | icon.name: "document-import" | ||
248 | onClicked: fileDialogLoader.active = true | 251 | onClicked: fileDialogLoader.active = true | ||
249 | } | 252 | } | ||
250 | 253 | | |||
251 | QtControls.Button { | 254 | QtControls.Button { | ||
255 | enabled: !kcm.iconsSettings.isImmutable("Theme") | ||||
252 | text: i18n("Get New Icons...") | 256 | text: i18n("Get New Icons...") | ||
253 | icon.name: "get-hot-new-stuff" | 257 | icon.name: "get-hot-new-stuff" | ||
254 | onClicked: kcm.getNewStuff(this) | 258 | onClicked: kcm.getNewStuff(this) | ||
255 | visible: KAuthorized.authorize("ghns") | 259 | visible: KAuthorized.authorize("ghns") | ||
256 | } | 260 | } | ||
257 | } | 261 | } | ||
258 | } | 262 | } | ||
259 | 263 | | |||
Show All 27 Lines |
Why this change?