Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/khintssettings.cpp
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Line(s) | |||||
263 | 263 | | |||
264 | void KHintsSettings::slotNotifyChange(int type, int arg) | 264 | void KHintsSettings::slotNotifyChange(int type, int arg) | ||
265 | { | 265 | { | ||
266 | mKdeGlobals->reparseConfiguration(); | 266 | mKdeGlobals->reparseConfiguration(); | ||
267 | KConfigGroup cg(mKdeGlobals, "KDE"); | 267 | KConfigGroup cg(mKdeGlobals, "KDE"); | ||
268 | 268 | | |||
269 | switch (type) { | 269 | switch (type) { | ||
270 | case PaletteChanged: { | 270 | case PaletteChanged: { | ||
271 | // Don't change the palette if the application has a custom one set | ||||
272 | if (!qApp->property("KDE_COLOR_SCHEME_PATH").toString().isEmpty()) { | ||||
273 | break; | ||||
274 | } | ||||
271 | loadPalettes(); | 275 | loadPalettes(); | ||
272 | 276 | | |||
273 | //QApplication::setPalette and QGuiApplication::setPalette are different functions | 277 | //QApplication::setPalette and QGuiApplication::setPalette are different functions | ||
274 | //and non virtual. Call the correct one | 278 | //and non virtual. Call the correct one | ||
275 | if (qobject_cast<QApplication *>(QCoreApplication::instance())) { | 279 | if (qobject_cast<QApplication *>(QCoreApplication::instance())) { | ||
276 | QPalette palette = *m_palettes[QPlatformTheme::SystemPalette]; | 280 | QPalette palette = *m_palettes[QPlatformTheme::SystemPalette]; | ||
277 | QApplication::setPalette(palette); | 281 | QApplication::setPalette(palette); | ||
278 | // QTBUG QGuiApplication::paletteChanged() signal is only emitted by QGuiApplication | 282 | // QTBUG QGuiApplication::paletteChanged() signal is only emitted by QGuiApplication | ||
▲ Show 20 Lines • Show All 243 Lines • Show Last 20 Lines |