Changeset View
Changeset View
Standalone View
Standalone View
kcms/ksplash/package/contents/ui/main.qml
Show All 20 Lines | |||||
21 | import QtQuick.Controls 1.0 as QtControls | 21 | import QtQuick.Controls 1.0 as QtControls | ||
22 | import org.kde.kirigami 2.4 as Kirigami | 22 | import org.kde.kirigami 2.4 as Kirigami | ||
23 | import org.kde.kconfig 1.0 // for KAuthorized | 23 | import org.kde.kconfig 1.0 // for KAuthorized | ||
24 | import org.kde.kcm 1.1 as KCM | 24 | import org.kde.kcm 1.1 as KCM | ||
25 | 25 | | |||
26 | KCM.GridViewKCM { | 26 | KCM.GridViewKCM { | ||
27 | KCM.ConfigModule.quickHelp: i18n("This module lets you choose the splash screen theme.") | 27 | KCM.ConfigModule.quickHelp: i18n("This module lets you choose the splash screen theme.") | ||
28 | 28 | | |||
29 | enabled: !kcm.testing | ||||
30 | | ||||
29 | view.model: kcm.splashModel | 31 | view.model: kcm.splashModel | ||
30 | //NOTE: pay attention to never break this binding | 32 | //NOTE: pay attention to never break this binding | ||
31 | view.currentIndex: kcm.selectedPluginIndex | 33 | view.currentIndex: kcm.selectedPluginIndex | ||
34 | | ||||
35 | // putting the InlineMessage as header item causes it to show up initially despite visible false | ||||
36 | header: ColumnLayout { | ||||
37 | Kirigami.InlineMessage { | ||||
38 | id: testingFailedLabel | ||||
39 | Layout.fillWidth: true | ||||
40 | showCloseButton: true | ||||
41 | type: Kirigami.MessageType.Error | ||||
42 | text: i18n("Failed to test the splash screen.") | ||||
43 | | ||||
44 | Connections { | ||||
45 | target: kcm | ||||
46 | onTestingFailed: testingFailedLabel.visible = true | ||||
47 | } | ||||
48 | } | ||||
49 | } | ||||
50 | | ||||
32 | view.delegate: KCM.GridDelegate { | 51 | view.delegate: KCM.GridDelegate { | ||
33 | id: delegate | 52 | id: delegate | ||
34 | 53 | | |||
35 | text: model.display | 54 | text: model.display | ||
36 | toolTip: model.description | 55 | toolTip: model.description | ||
37 | 56 | | |||
38 | thumbnailAvailable: !!model.screenshot | 57 | thumbnailAvailable: !!model.screenshot | ||
39 | thumbnail: Image { | 58 | thumbnail: Image { | ||
Show All 29 Lines |