no longer uses plasmarc for the presence or not of those hints but uses
the usual theme specific file. and expires the cache when system color changes and a tinting is required. for some reasons a plasma restart is still required to get colors applied correctly, some renderer doesn't get properly deleted on theme change? svn path=/trunk/KDE/kdelibs/; revision=885241
This commit is contained in:
parent
34ab711509
commit
5a987e0a0b
12
svg.cpp
12
svg.cpp
@ -276,14 +276,14 @@ class SvgPrivate
|
||||
|
||||
void checkApplyColorHint()
|
||||
{
|
||||
KConfigGroup cg(KGlobal::config(), "SvgHints");
|
||||
QString cgKey = themePath + "-hint-apply-color-scheme";
|
||||
if (cg.hasKey(cgKey)) {
|
||||
applyColors = cg.readEntry(cgKey, false);
|
||||
QRectF elementRect;
|
||||
bool found = Theme::defaultTheme()->findInRectsCache(themePath, cacheId("hint-apply-color-scheme"), elementRect);
|
||||
|
||||
if (found) {
|
||||
applyColors = elementRect.isValid();
|
||||
} else {
|
||||
createRenderer();
|
||||
findAndCacheElementRect("hint-apply-color-scheme");
|
||||
applyColors = renderer->elementExists("hint-apply-color-scheme");
|
||||
cg.writeEntry(cgKey, applyColors);
|
||||
}
|
||||
}
|
||||
|
||||
|
11
theme.cpp
11
theme.cpp
@ -102,6 +102,7 @@ public:
|
||||
|
||||
QString findInTheme(const QString &image, const QString &theme) const;
|
||||
void compositingChanged();
|
||||
void discardCache();
|
||||
|
||||
static const char *defaultTheme;
|
||||
static PackageStructure::Ptr packageStructure;
|
||||
@ -169,6 +170,11 @@ void ThemePrivate::compositingChanged()
|
||||
#endif
|
||||
}
|
||||
|
||||
void ThemePrivate::discardCache()
|
||||
{
|
||||
pixmapCache->discard();
|
||||
}
|
||||
|
||||
class ThemeSingleton
|
||||
{
|
||||
public:
|
||||
@ -286,10 +292,15 @@ void Theme::setThemeName(const QString &themeName)
|
||||
|
||||
disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()),
|
||||
this, SIGNAL(themeChanged()));
|
||||
disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()),
|
||||
this, SLOT(discardCache()));
|
||||
|
||||
if (colorsFile.isEmpty()) {
|
||||
d->colors = 0;
|
||||
connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()),
|
||||
this, SIGNAL(themeChanged()));
|
||||
connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()),
|
||||
this, SLOT(discardCache()));
|
||||
} else {
|
||||
d->colors = KSharedConfig::openConfig(colorsFile);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user