[effects/slide] Add 'Duration' option
ClosedPublic

Authored by zzag on Dec 17 2017, 7:27 PM.

Details

Summary

At the moment, there is no way to tweak duration of the slide animation.
This change adds a configuration module so it is possible to change
the duration.

Test Plan
  • enable virtual desktops
  • go to System Settings > Desktop Behaviour > Desktop Effects and select Slide effect under "Virtual Desktop Switching Animation"
  • click settings/options button and change duration

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Dec 17 2017, 7:27 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 17 2017, 7:27 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
zzag requested review of this revision.Dec 17 2017, 7:27 PM
graesslin added inline comments.
effects/slide/slide.cpp
31–32

I don't think that's needed

53–57

The pattern from other effects would be:

const auto duration = animationTime(SlideConfig::duration() != 0 ? SlideConfig::duration() : 250);
297

Please keep this new line

effects/slide/slide_config.ui
37

It's not a rotation

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptDec 17 2017, 7:53 PM
zzag updated this revision to Diff 24044.Dec 17 2017, 8:21 PM

Fixes for D9382

Delete DEFAULT_SLIDE_DURATION, add empty newline at the end of
slide.cpp, fix typo.

Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptDec 17 2017, 8:21 PM
zzag marked 4 inline comments as done.Dec 17 2017, 8:45 PM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptDec 17 2017, 8:45 PM
graesslin accepted this revision.Dec 18 2017, 8:15 PM
graesslin added inline comments.
effects/slide/slide_config.h
37

just a minor thingy: please use nullptr instead of 0 in new code.

This revision is now accepted and ready to land.Dec 18 2017, 8:15 PM
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptDec 18 2017, 8:15 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptJan 1 2018, 2:54 PM