KDE-wide Animation settings

David Faure faure at kde.org
Sat Jan 4 22:11:14 UTC 2014


On Saturday 04 January 2014 23:02:35 Dominik Haumann wrote:
> On Saturday 04 January 2014 20:56:30 Hugo Pereira Da Costa wrote:
> > ok. So this should go to kstyle (nothing oxygen explicit in there).
> > 
> > In fact, kstyle returns:
> > 
> > KConfigGroup g(KSharedConfig::openConfig(), "KDE-Global GUI Settings");
> > 
> > return g.readEntry("GraphicEffectsLevel", 0);
> > 
> > mmm. No clue which KCM sets this :)
> > (but that answers Dominik's original question I guess)
> 
> Yes, that answers my question. In particular, using the code
> 
>   widget->style()->styleHint(QStyle::SH_Widget_Animate, 0, widget)
> 
> is correct *if* we use a KStyle based style.

No, it's correct in all cases :)
With the other Qt styles you get "true", which is the correct default value.

> What I personally would like more is to always be able to read this.
> 
> I of course can use a KSharedConfig::openConfig() and then read the config
> value myself. However, would it be of interest to have a static accessor for
> this? Downside is that there are quite a lot of kdeglobals dependent
> entries...
> 
> Is the preferred way to read this value manually then in KatePart?
> Would that also be the preferred way in KMessageWidget?

I don't really see what the issue is. Do you care that much for Windows users 
to be able to turn animations off?

> Another issue we have in Kate code: kdeglobals right now do not have this
> effects enabled by default. A unit test from kde4 times now fails in kf5,
> because the timings are different, because the effects are off.
> 
> Are there plans to have a kdeglobals that has enabled effects?

As I said, it's a bug in the readEntry() call above. The default is supposed 
to be 1, so you don't need a special kdeglobals.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list