SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** In any of the chess activities, hiding the bottom taskbar results in the chess board expanding. While it expands, the chess pieces lag behind and so this animation doesn't seem clean. STEPS TO REPRODUCE 1. Open any of the three chess activities 2. Click on bottom left button OBSERVED RESULT The chess board size increases while the pieces lag behind. EXPECTED RESULT Perhaps keeping the chess board at the same size (which happens in some other activities)? SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
This is expected/not a bug, as this is a side effect of the way the position of the pieces is relative to the size and position of the board. And so resizing/moving the board triggers re-computation of the size and position of all the pieces, which is a bit computing-intensive and can not be perfectly in sync with the board resizing. This is not only happening when hiding the bar, but also for example when resizing the window, or on phone when turning between portrait/landscape. Increasing the chess board when hiding the bar is a deliberate choice we made to improve the usability especially on small touch devices. We do the same in a few activities, but in most of them it's not really necessary. So I'm closing it as not-a-bug, as this is expected behaviour and as far as I know we can not really do anything about it without compromising on other aspects.
Oh, actually I might have spoken too fast... I've checked and this issue is mostly caused by the fact we use an Easing.InOutQuad animation of 200ms on pieces move, which is intended for when pieces move when playing. But as it's done in a way that it's triggered for any position move, it happens also when resizing... I'm reopening the bug and I'll take a look if I can find a way to trigger this animation only when playing, not when resizing the board. (and if I succeed I'll do the same change in checkers which is coded the same way).
Git commit da9fc4224d25a47d03355109258df03ded5c2438 by Timothée Giet. Committed on 24/11/2022 at 20:11. Pushed by timotheegiet into branch 'master'. chess, fix animation of pieces while resizing the board do not animate piece position change while resizing the board M +3 -0 src/activities/chess/Chess.qml M +2 -2 src/activities/chess/Piece.qml M +2 -0 src/activities/chess/chess.js https://invent.kde.org/education/gcompris/commit/da9fc4224d25a47d03355109258df03ded5c2438
Problem fixed, thanks for the report :)