Fix broken theme change from theme svgs that do not use "hint-apply-colors" to theme svgs

that do.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816504
This commit is contained in:
Andrew Lake 2008-06-04 02:51:31 +00:00
parent cc80b06826
commit e729dcd481

10
svg.cpp
View File

@ -267,6 +267,16 @@ class Svg::Private
path = newPath;
//delete d->renderer; we're a KSharedPtr
eraseRenderer();
// check if new theme svg wants colorscheme applied
createRenderer();
applyColors = renderer->elementExists("hint-apply-color-scheme");
if (applyColors && !Theme::defaultTheme()->colorScheme()) {
connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(colorsChanged()));
} else {
disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(colorsChanged()));
}
emit q->repaintNeeded();
}