Changeset View
Changeset View
Standalone View
Standalone View
kcms/desktoptheme/package/contents/ui/main.qml
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright (c) 2014 Marco Martin <mart@kde.org> | 2 | Copyright (c) 2014 Marco Martin <mart@kde.org> | ||
3 | Copyright (c) 2016 David Rosca <nowrep@gmail.com> | 3 | Copyright (c) 2016 David Rosca <nowrep@gmail.com> | ||
4 | Copyright (c) 2018 Kai Uwe Broulik <kde@privat.broulik.de> | 4 | Copyright (c) 2018 Kai Uwe Broulik <kde@privat.broulik.de> | ||
5 | Copyright (c) 2019 Kevin Ottens <kevin.ottens@enioka.com> | ||||
5 | 6 | | |||
6 | This library is free software; you can redistribute it and/or | 7 | This library is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU Library General Public | 8 | modify it under the terms of the GNU Library General Public | ||
8 | License version 2 as published by the Free Software Foundation. | 9 | License version 2 as published by the Free Software Foundation. | ||
9 | 10 | | |||
10 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Show All 12 Lines | |||||
25 | import org.kde.kirigami 2.4 as Kirigami | 26 | import org.kde.kirigami 2.4 as Kirigami | ||
26 | import org.kde.kconfig 1.0 // for KAuthorized | 27 | import org.kde.kconfig 1.0 // for KAuthorized | ||
27 | import org.kde.kcm 1.1 as KCM | 28 | import org.kde.kcm 1.1 as KCM | ||
28 | 29 | | |||
29 | KCM.GridViewKCM { | 30 | KCM.GridViewKCM { | ||
30 | KCM.ConfigModule.quickHelp: i18n("This module lets you choose the Plasma style.") | 31 | KCM.ConfigModule.quickHelp: i18n("This module lets you choose the Plasma style.") | ||
31 | 32 | | |||
32 | view.model: kcm.desktopThemeModel | 33 | view.model: kcm.desktopThemeModel | ||
33 | view.currentIndex: kcm.selectedPluginIndex | 34 | view.currentIndex: kcm.pluginIndex(kcm.desktopThemeSettings.name) | ||
34 | 35 | | |||
35 | enabled: !kcm.downloadingFile | 36 | enabled: !kcm.downloadingFile | ||
36 | 37 | | |||
37 | DropArea { | 38 | DropArea { | ||
38 | anchors.fill: parent | 39 | anchors.fill: parent | ||
39 | onEntered: { | 40 | onEntered: { | ||
40 | if (!drag.hasUrls) { | 41 | if (!drag.hasUrls) { | ||
41 | drag.accepted = false; | 42 | drag.accepted = false; | ||
Show All 39 Lines | 81 | Kirigami.Action { | |||
81 | iconName: "edit-undo" | 82 | iconName: "edit-undo" | ||
82 | tooltip: i18n("Restore Theme") | 83 | tooltip: i18n("Restore Theme") | ||
83 | visible: model.pendingDeletion | 84 | visible: model.pendingDeletion | ||
84 | onTriggered: kcm.setPendingDeletion(model.index, false); | 85 | onTriggered: kcm.setPendingDeletion(model.index, false); | ||
85 | } | 86 | } | ||
86 | ] | 87 | ] | ||
87 | 88 | | |||
88 | onClicked: { | 89 | onClicked: { | ||
89 | kcm.selectedPlugin = model.pluginName; | 90 | kcm.desktopThemeSettings.name = model.pluginName; | ||
90 | view.forceActiveFocus(); | 91 | view.forceActiveFocus(); | ||
91 | } | 92 | } | ||
92 | } | 93 | } | ||
93 | 94 | | |||
94 | footer: ColumnLayout { | 95 | footer: ColumnLayout { | ||
95 | Kirigami.InlineMessage { | 96 | Kirigami.InlineMessage { | ||
96 | id: infoLabel | 97 | id: infoLabel | ||
97 | Layout.fillWidth: true | 98 | Layout.fillWidth: true | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |