https://bugs.kde.org/show_bug.cgi?id=373101

Igor Poboiko <igor.pobo...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Latest Commit|                            |https://commits.kde.org/kwi
                   |                            |n/6408e0ba6045d03b8872eab71
                   |                            |060ac8d6f13ee9f
         Resolution|---                         |FIXED

--- Comment #5 from Igor Poboiko <igor.pobo...@gmail.com> ---
Git commit 6408e0ba6045d03b8872eab71060ac8d6f13ee9f by Igor Poboiko.
Committed on 01/06/2018 at 15:32.
Pushed by poboiko into branch 'master'.

[effects/cube] Fix animation and reflection issues

The main problem was that inside the effect there was manualVerticalAngle,
which did not represent the actual rotation angle of the cube during the
animation, but used to calculate the position of the reflection. The actual
angle was calculated on-the-fly and was not exposed outside.

Brief description of what the code does:

- variables currentAngle and verticalCurrentAngle now always represent the
current position of the cube. They are updated when one uses the mouse and
inside the rotateCube() method, which is called in prePaintScreen().
- two queues, animations (used for Start / Stop / Left / Right) and
verticalAnimations (used for Up / Down) are used for scheduling the animations
if i.e. user presses several keys in a row. The code checks whether the last
animation has finished (and thus we need to start a new one) inside
prePaintScreen() and postPaintScreen()
 - when the animation starts, code saves the starting position of the cube
inside startAngle, startFrontDesktop and verticalStartAngle variables, which
are used to calculate the actual cube position during the animation later.
This is done by startAnimation() and startVerticalAnimation(), which also
calculates the QTimeLine curves needed for animation
Related: bug 213599

Differential Revision: https://phabricator.kde.org/D9860

M  +256  -441  effects/cube/cube.cpp
M  +26   -19   effects/cube/cube.h

https://commits.kde.org/kwin/6408e0ba6045d03b8872eab71060ac8d6f13ee9f

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to