[PATCH] Fix theme change bug for applyColors theme SVGs

Jamboarder jamboarder at yahoo.com
Wed Jun 4 03:21:41 CEST 2008


Didn't hear read any objections so I'll commit this
shortly.

Hope this helps,
Andrew

--- Jamboarder <jamboarder at yahoo.com> wrote:

> This patch fixes a current bug that does not respect
> "hint-apply-color-scheme" hint when changing Plasma
> themes.
> 
> This bug only occurs when changing from themes with
> SVGs that do not have the hint element (e.g. default
> theme to themes with SVGs that do contain the hint
> element (e.g. Aya).
> 
> I'll commit shortly if there are no objections.
> 
> Hope this helps,
> Andrew (Jamboarder) Lake> Index: svg.cpp
>
===================================================================
> --- svg.cpp	(revision 815505)
> +++ svg.cpp	(working copy)
> @@ -267,6 +267,16 @@
>              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();
>          }
>  
> > _______________________________________________
> Panel-devel mailing list
> Panel-devel at kde.org
> https://mail.kde.org/mailman/listinfo/panel-devel
> 



More information about the Panel-devel mailing list