Changeset View
Changeset View
Standalone View
Standalone View
kded/gtkconfig.cpp
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Line(s) | |||||
155 | } | 155 | } | ||
156 | 156 | | |||
157 | void GtkConfig::setDarkThemePreference() const | 157 | void GtkConfig::setDarkThemePreference() const | ||
158 | { | 158 | { | ||
159 | const bool preferDarkTheme = configValueProvider->preferDarkTheme(); | 159 | const bool preferDarkTheme = configValueProvider->preferDarkTheme(); | ||
160 | ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-application-prefer-dark-theme"), preferDarkTheme); | 160 | ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-application-prefer-dark-theme"), preferDarkTheme); | ||
161 | } | 161 | } | ||
162 | 162 | | |||
163 | void GtkConfig::setWindowDecorationsAppearance() const | ||||
164 | { | ||||
165 | const QMap<QString, QPixmap> windowDecorationsButtonsImages = configValueProvider->windowDecorationsButtonsImages(); | ||||
166 | ConfigEditor::setClientSideDecorations(windowDecorationsButtonsImages); | ||||
167 | } | ||||
168 | | ||||
163 | void GtkConfig::setWindowDecorationsButtonsOrder() const | 169 | void GtkConfig::setWindowDecorationsButtonsOrder() const | ||
164 | { | 170 | { | ||
165 | const QString windowDecorationsButtonOrder = configValueProvider->windowDecorationsButtonsOrder(); | 171 | const QString windowDecorationsButtonOrder = configValueProvider->windowDecorationsButtonsOrder(); | ||
166 | ConfigEditor::setGtk3ConfigValueGSettings(QStringLiteral("button-layout"), windowDecorationsButtonOrder, QStringLiteral("org.gnome.desktop.wm.preferences")); | 172 | ConfigEditor::setGtk3ConfigValueGSettings(QStringLiteral("button-layout"), windowDecorationsButtonOrder, QStringLiteral("org.gnome.desktop.wm.preferences")); | ||
167 | ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-decoration-layout"), windowDecorationsButtonOrder); | 173 | ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-decoration-layout"), windowDecorationsButtonOrder); | ||
168 | ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Gtk/DecorationLayout"), windowDecorationsButtonOrder); | 174 | ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Gtk/DecorationLayout"), windowDecorationsButtonOrder); | ||
169 | } | 175 | } | ||
170 | 176 | | |||
Show All 17 Lines | 193 | { | |||
188 | setFont(); | 194 | setFont(); | ||
189 | setIconTheme(); | 195 | setIconTheme(); | ||
190 | setCursorTheme(); | 196 | setCursorTheme(); | ||
191 | setIconsOnButtons(); | 197 | setIconsOnButtons(); | ||
192 | setIconsInMenus(); | 198 | setIconsInMenus(); | ||
193 | setToolbarStyle(); | 199 | setToolbarStyle(); | ||
194 | setScrollbarBehavior(); | 200 | setScrollbarBehavior(); | ||
195 | setDarkThemePreference(); | 201 | setDarkThemePreference(); | ||
202 | setWindowDecorationsAppearance(); | ||||
196 | setWindowDecorationsButtonsOrder(); | 203 | setWindowDecorationsButtonsOrder(); | ||
197 | setEnableAnimations(); | 204 | setEnableAnimations(); | ||
198 | setColors(); | 205 | setColors(); | ||
199 | } | 206 | } | ||
200 | 207 | | |||
201 | void GtkConfig::onKdeglobalsSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const | 208 | void GtkConfig::onKdeglobalsSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const | ||
202 | { | 209 | { | ||
203 | if (group.name() == QStringLiteral("KDE")) { | 210 | if (group.name() == QStringLiteral("KDE")) { | ||
Show All 25 Lines | 235 | } else if (group.name() == QStringLiteral("Toolbar style")) { | |||
229 | if (names.contains(QByteArrayLiteral("ToolButtonStyle"))) { | 236 | if (names.contains(QByteArrayLiteral("ToolButtonStyle"))) { | ||
230 | setToolbarStyle(); | 237 | setToolbarStyle(); | ||
231 | } | 238 | } | ||
232 | } | 239 | } | ||
233 | } | 240 | } | ||
234 | 241 | | |||
235 | void GtkConfig::onKWinSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const | 242 | void GtkConfig::onKWinSettingsChange(const KConfigGroup &group, const QByteArrayList &names) const | ||
236 | { | 243 | { | ||
237 | if (group.name() == QStringLiteral("org.kde.kdecoration2") | 244 | if (group.name() == QStringLiteral("org.kde.kdecoration2")) { | ||
238 | && (names.contains("ButtonsOnRight") || names.contains("ButtonsOnLeft"))) { | 245 | if (names.contains(QByteArrayLiteral("ButtonsOnRight")) | ||
246 | || names.contains(QByteArrayLiteral("ButtonsOnLeft"))) { | ||||
239 | setWindowDecorationsButtonsOrder(); | 247 | setWindowDecorationsButtonsOrder(); | ||
240 | } | 248 | } | ||
249 | if (names.contains(QByteArrayLiteral("theme"))) { | ||||
250 | setWindowDecorationsAppearance(); | ||||
251 | } | ||||
252 | } | ||||
241 | } | 253 | } | ||
242 | 254 | | |||
243 | void GtkConfig::onKCMInputSettingsChange(const KConfigGroup& group, const QByteArrayList& names) const | 255 | void GtkConfig::onKCMInputSettingsChange(const KConfigGroup& group, const QByteArrayList& names) const | ||
244 | { | 256 | { | ||
245 | if (group.name() == QStringLiteral("Mouse") | 257 | if (group.name() == QStringLiteral("Mouse") | ||
246 | && names.contains("cursorTheme")) { | 258 | && names.contains("cursorTheme")) { | ||
247 | setCursorTheme(); | 259 | setCursorTheme(); | ||
248 | } | 260 | } | ||
249 | } | 261 | } | ||
250 | 262 | | |||
251 | 263 | | |||
252 | #include "gtkconfig.moc" | 264 | #include "gtkconfig.moc" |