Changeset View
Changeset View
Standalone View
Standalone View
kcms/ksplash/package/contents/ui/main.qml
Show All 11 Lines | 1 | /* | |||
---|---|---|---|---|---|
12 | 12 | | |||
13 | You should have received a copy of the GNU Library General Public License | 13 | You should have received a copy of the GNU Library General Public License | ||
14 | along with this library; see the file COPYING.LIB. If not, write to | 14 | along with this library; see the file COPYING.LIB. If not, write to | ||
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | Boston, MA 02110-1301, USA. | 16 | Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.1 | 19 | import QtQuick 2.1 | ||
20 | import QtQuick.Window 2.2 | ||||
20 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 | ||
21 | import QtQuick.Controls 1.0 as QtControls | 22 | import QtQuick.Controls 1.0 as QtControls | ||
22 | import org.kde.kirigami 2.4 as Kirigami | 23 | import org.kde.kirigami 2.4 as Kirigami | ||
23 | import org.kde.kconfig 1.0 // for KAuthorized | 24 | import org.kde.kconfig 1.0 // for KAuthorized | ||
24 | import org.kde.kcm 1.1 as KCM | 25 | import org.kde.kcm 1.1 as KCM | ||
25 | 26 | | |||
26 | KCM.GridViewKCM { | 27 | KCM.GridViewKCM { | ||
27 | KCM.ConfigModule.quickHelp: i18n("This module lets you choose the splash screen theme.") | 28 | KCM.ConfigModule.quickHelp: i18n("This module lets you choose the splash screen theme.") | ||
28 | 29 | | |||
29 | view.model: kcm.splashModel | 30 | view.model: kcm.splashModel | ||
30 | //NOTE: pay attention to never break this binding | 31 | //NOTE: pay attention to never break this binding | ||
31 | view.currentIndex: kcm.selectedPluginIndex | 32 | view.currentIndex: kcm.selectedPluginIndex | ||
32 | view.delegate: KCM.GridDelegate { | 33 | view.delegate: KCM.GridDelegate { | ||
33 | id: delegate | 34 | id: delegate | ||
34 | 35 | | |||
35 | text: model.display | 36 | text: model.display | ||
36 | toolTip: model.description | 37 | toolTip: model.description | ||
37 | 38 | | |||
38 | thumbnailAvailable: !!model.screenshot | 39 | thumbnailAvailable: !!model.screenshot | ||
39 | thumbnail: Image { | 40 | thumbnail: Image { | ||
40 | anchors.fill: parent | 41 | anchors.fill: parent | ||
41 | source: model.screenshot || "" | 42 | source: model.screenshot || "" | ||
43 | sourceSize: Qt.size(delegate.GridView.view.cellWidth * Screen.devicePixelRatio, | ||||
44 | delegate.GridView.view.cellHeight * Screen.devicePixelRatio) | ||||
42 | } | 45 | } | ||
43 | actions: [ | 46 | actions: [ | ||
44 | Kirigami.Action { | 47 | Kirigami.Action { | ||
45 | visible: model.pluginName != "None" | 48 | visible: model.pluginName != "None" | ||
46 | iconName: "media-playback-start" | 49 | iconName: "media-playback-start" | ||
47 | tooltip: i18n("Test Splash Screen") | 50 | tooltip: i18n("Test Splash Screen") | ||
48 | onTriggered: kcm.test(model.pluginName) | 51 | onTriggered: kcm.test(model.pluginName) | ||
49 | } | 52 | } | ||
Show All 19 Lines |