Changeset View
Changeset View
Standalone View
Standalone View
kcms/style/package/contents/ui/main.qml
Show All 29 Lines | 28 | KCM.GridViewKCM { | |||
---|---|---|---|---|---|
30 | 30 | | |||
31 | KCM.ConfigModule.quickHelp: i18n("This module allows you to modify the visual appearance of applications' user interface elements.") | 31 | KCM.ConfigModule.quickHelp: i18n("This module allows you to modify the visual appearance of applications' user interface elements.") | ||
32 | 32 | | |||
33 | view.model: kcm.model | 33 | view.model: kcm.model | ||
34 | view.currentIndex: kcm.model.selectedStyleIndex | 34 | view.currentIndex: kcm.model.selectedStyleIndex | ||
35 | 35 | | |||
36 | view.enabled: !kcm.styleSettings.isImmutable("widgetStyle") | 36 | view.enabled: !kcm.styleSettings.isImmutable("widgetStyle") | ||
37 | 37 | | |||
38 | function openGtkStyleSettings() { | ||||
39 | kcm.push("GtkStylePage.qml"); | ||||
40 | } | ||||
41 | | ||||
38 | Component.onCompleted: { | 42 | Component.onCompleted: { | ||
39 | // The widget thumbnails are a bit more elaborate and need more room, especially when translated | 43 | // The widget thumbnails are a bit more elaborate and need more room, especially when translated | ||
40 | view.implicitCellWidth = Kirigami.Units.gridUnit * 20; | 44 | view.implicitCellWidth = Kirigami.Units.gridUnit * 20; | ||
41 | view.implicitCellHeight = Kirigami.Units.gridUnit * 15; | 45 | view.implicitCellHeight = Kirigami.Units.gridUnit * 15; | ||
42 | } | 46 | } | ||
43 | 47 | | |||
44 | // putting the InlineMessage as header item causes it to show up initially despite visible false | 48 | // putting the InlineMessage as header item causes it to show up initially despite visible false | ||
45 | header: ColumnLayout { | 49 | header: ColumnLayout { | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 104 | actions: [ | |||
106 | } | 110 | } | ||
107 | ] | 111 | ] | ||
108 | onClicked: { | 112 | onClicked: { | ||
109 | kcm.model.selectedStyle = model.styleName; | 113 | kcm.model.selectedStyle = model.styleName; | ||
110 | view.forceActiveFocus(); | 114 | view.forceActiveFocus(); | ||
111 | } | 115 | } | ||
112 | } | 116 | } | ||
113 | 117 | | |||
114 | footer: RowLayout { | 118 | footer: ColumnLayout { | ||
115 | Layout.fillWidth: true | 119 | RowLayout { | ||
120 | Layout.alignment: Qt.AlignLeft | ||||
116 | 121 | | |||
117 | QtControls.Button { | 122 | QtControls.Button { | ||
118 | id: effectSettingsButton | 123 | id: effectSettingsButton | ||
119 | text: i18n("Configure Icons and Toolbars") | 124 | text: i18n("Configure Icons and Toolbars") | ||
120 | icon.name: "configure-toolbars" // proper icon? | 125 | icon.name: "configure-toolbars" // proper icon? | ||
121 | checkable: true | 126 | checkable: true | ||
122 | checked: effectSettingsPopupLoader.item && effectSettingsPopupLoader.item.opened | 127 | checked: effectSettingsPopupLoader.item && effectSettingsPopupLoader.item.opened | ||
123 | onClicked: { | 128 | onClicked: { | ||
124 | effectSettingsPopupLoader.active = true; | 129 | effectSettingsPopupLoader.active = true; | ||
125 | effectSettingsPopupLoader.item.open(); | 130 | effectSettingsPopupLoader.item.open(); | ||
126 | } | 131 | } | ||
127 | } | 132 | } | ||
133 | | ||||
134 | QtControls.Button { | ||||
135 | id: gtkSettingsButton | ||||
136 | visible: kcm.gtkConfigKdedModuleLoaded() | ||||
137 | text: i18n("Configure GNOME/GTK Application Style...") | ||||
138 | icon.name: "configure" | ||||
139 | onClicked: root.openGtkStyleSettings() | ||||
140 | } | ||||
141 | } | ||||
128 | } | 142 | } | ||
129 | 143 | | |||
130 | Loader { | 144 | Loader { | ||
131 | id: effectSettingsPopupLoader | 145 | id: effectSettingsPopupLoader | ||
132 | active: false | 146 | active: false | ||
133 | sourceComponent: EffectSettingsPopup { | 147 | sourceComponent: EffectSettingsPopup { | ||
134 | parent: effectSettingsButton | 148 | parent: effectSettingsButton | ||
135 | y: -height | 149 | y: -height | ||
136 | } | 150 | } | ||
137 | } | 151 | } | ||
138 | } | 152 | } |