Workspace animation jiggly
Mine:
https://github.com/Aylur/ags/assets/72612857/9e7d86bf-21cf-4235-9d1a-5366c7a0e13c
Yours:
https://github.com/Aylur/ags/assets/72612857/7a909402-7c16-4df9-a8c7-552dd81eb824
This is something that's been driving me nuts, but my workspace animation is "jiggly" for some reason. When it animates, it kinda shifts the spacing in a weird way.
I copied the workspace part of your dotfiles pretty closely, so I'm not sure what went wrong here.
mine used to be like that too, but I just got used to it and didn't even notice that it went away It used to be buttons inside an eventbox, but now its just a button with labels inside, maybe that caused it?
I wonder how Gnome implements this in their shell. From my casual observation, they don't have this problem.
I'm actually noticing that your implementation also "jiggles" when transitioning between the "empty" workspaces. Maybe Gnome is manually animating it with js?
it jiggles because an empty widget takes up less space than an occupied one gnome-shell is tightly integrated with with its compositor, which lets them follow workspaces with its animation
Hmmm, I kinda doubt that compositors can manipulate a UI element like this (or if it's even worth doing).
I looked through the gnome-shell's repo and just as I suspected, they're manually animating everything in js without a single css transition in sight. A few relevant places in the codebase:
-
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/7e5d97c52a80389c694b09d6c25325e4d13f6c00/js/ui/panel.js#L336-387
-
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/7e5d97c52a80389c694b09d6c25325e4d13f6c00/js/ui/panel.js#L261-333
Might look into this further and see if I can replicate in ags.
yes, but they are querying the workspace positions through Meta which are the bindings to the compositor, thats how the animation can follow swipe gestures
Oh, not sure about swipe gestures. Haven't used Gnome that much, but I'm mostly just annoyed with the jiggliness/unstableness. So I don't think I'd be needing swipe gestures.
it jiggles because an empty widget takes up less space than an occupied one gnome-shell is tightly integrated with with its compositor, which lets them follow workspaces with its animation
I think you're not quite getting the point, it's not about the element pushing each other away, it's all about the smoothness of the animation, for some reason the last frames seem to skip.
P.s. I am also looking for a solution for this problem, if anyone knows how to fix this, let me know and want to add that I'm absolutely not sure of what I'm saying, I'm new with it
https://github.com/user-attachments/assets/7859de9a-c74d-41ae-b395-57d30a4194d0
More specifically, the dot kind of grows a bit faster than it shrinks. So it causes the overall length of the widget to grow an extra pixel or two as the dots transitions. I once tried to set the css transition timing to linear, but it just made it worse for some reason.
To visualize the transition in ASCII (think of the |-| as a workspace dot):
|------|-|-|
|-----|----|-|
|----|-----|-|
|---|------|-|
|--|------|-|
|-|------|-|
Makes me wonder whether the issue still persists in GTK4.