KDE-wide Animation settings

David Faure faure at kde.org
Sun Jan 5 10:00:39 UTC 2014


On Sunday 05 January 2014 10:04:00 Hugo Pereira Da Costa wrote:
> On 01/04/2014 11:21 PM, Dominik Haumann wrote:
> > On Saturday 04 January 2014 23:11:14 David Faure wrote:
> >> 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.> 
> > Ok, I missed this one, thanks for the clarification!
> > 
> >>> 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?
> > 
> > Nevermind, was a misunderstanding then.
> > 
> >>> 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.
> > 
> > Ok, so who is going to fix it? ;) Hugo?
> 
> Question
> should the default simply be "1"
> or should kstyle re-introduce the same enumeration that was in
> KGlobalSettings ?
> 
> 
> enum GraphicEffect {
> 
> NoEffects = 0x0000, ///< GUI with no effects at all.
> GradientEffects = 0x0001, ///< GUI with only gradients enabled.
> SimpleAnimationEffects = 0x0002, ///< GUI with simple animations enabled.
> ComplexAnimationEffects = 0x0006 ///< GUI with complex animations enabled.

1) I don't think these multiple levels were ever used anywhere
2) the Qt widgets simply test it as a boolean

If you see a good reason for multiple levels, go for it; but if it's just 
because kde4 had it - not a good enough reason, since it wasn't used there.

-- 
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