elementary / dock

A quick app launcher and window switcher for Pantheon and elementary OS
https://elementary.io
GNU General Public License v3.0
87 stars 24 forks source link

Switch to Gtk.Fixed #197

Closed leolost2605 closed 7 months ago

leolost2605 commented 7 months ago

Currently we animate the moving of launchers with basic css. This will cause issues because we pretty much don't have any control once animation has started and it doesn't work well once we get to implementing drop support from the applications menu. Therefore this PR switches to using a Gtk.Fixed and manually positioning as well as using Adw.TimedAnimation for the move animation of the launchers. It requires a bit more manual work from our side but can be a lot more powerful in the future since we have more control. Also since we have fixed dimension and we don't have any text in the launchers the biggest issues of using a Gtk.Fixed don't apply here.

Also this PR separates a LauncherManager extending the Gtk.Fixed from the MainWindow to keep the code base IMHO cleaner

@elementary/ux : Adw.TimedAnimation has a TON of easing modes and I've got no idea which one to use here so some input would be helpful :) (also maybe a different duration like 200 ms would be better?)

vjr commented 7 months ago

Place your bets! I bet on EASE_IN_OUT_QUAD being the one to go with, haha.

leolost2605 commented 7 months ago

The last commits should fix most remaining issues and flickering when moving items which are also currently present in main. It also switches to 200ms animation duration and sets easing to EASE_IN_OUT_QUAD as suggested by @vjr which IMHO looks pretty good :)

leolost2605 commented 7 months ago

TODO: