Skip to content

Conversation

@leolost2605
Copy link
Member

Instead of having one big Gtk.Fixed with all of the launchers, separator, workspace, etc. introduce an ItemGroup class which holds the items of one group and add them together in a gtk.box. The ItemGroup works with a listmodel.
This has a couple advantages.

  • the resize animation now finally applies again because right now it doesn't do anything since when a launcher gets added it never is the last item with the new workspace switcher.
  • this addresses Increase the separation between app launchers and workspaces #511 a bit because the 2 pixels of the separator are now actually respected in the layout. If we want to address that more this will also be much easier because we can just add margins etc. because of the next point
  • This simplifies layout handling because we don't have to iterate over multiple lists now and specially layout things like the separator and the dynamic workspace item because things at fixed positions are layout by the box and in the item group we just have a single list we need to layout
  • Simplifies the repositioning logic because we just treat a reposition as remove + add

To reduce the diff the listmodels are still in the main itemmanager and just relay the current mechanisms to the item group via the listmodel. Therefore the following points will be for the future:

  • The item groups being based on listmodels will allow us to simplify our item management. I.e. the app system and the workspace system can just provide a listmodel with their items and we don't need to go weird routes via connecting to added signals from the systems and to removed signals from the items which connect to removed signals to their apps/workspaces
  • Syncing pinned launchers is right now split between appsystem and itemmanager and can be unified in the app system
  • We can get rid of all of the type checking if else ifs

@leolost2605 leolost2605 force-pushed the leolost/item-group branch 5 times, most recently from 1fbd5e6 to 43ddd16 Compare November 29, 2025 16:09
@leolost2605 leolost2605 marked this pull request as ready for review November 29, 2025 16:12
@leolost2605 leolost2605 force-pushed the leolost/item-group branch 2 times, most recently from 7d2ad1c to e4accab Compare November 29, 2025 16:39
@leolost2605 leolost2605 requested a review from a team November 29, 2025 16:40
@danirabbit
Copy link
Member

I'd like to get out this upcoming bug fix release before we make a big change just to make sure we have time to test for regressions :)

@leolost2605
Copy link
Member Author

Ah yes I agree I actually wanted to say that somewhere but I forgot :|

@danirabbit danirabbit moved this to Needs review in OS 8.1.1 Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

3 participants