plugins/overview: Auto-arrange Desktop Grid View (Wayland)
X11 branch: kwin-x11!18
Reintroducing a useful feature for the combined Overview + Grid effect: Auto-tiling of the Desktop Grid, apart from the system Virtual Desktop/Pager rows.
Resolves BUG:482418
This MR:
-
Adds QML logic, using a square root of the desktop count to calculate the rows and columns to fill a square grid.
- This intentionally "unpairs" the Desktop Grid's layout from Plasma Workspace and Pager, as is desirable in many use cases.
-
Adds KCM toggle to switch Desktop Grid effect behavior back to the current global VD row count, with auto-tiling on by default.
- Adjusts the adjacent KCM entries to match Task Switcher KCM layout
System Settings:
Optimal layouts (debug desktop labels removed in current MR):
Odds and ends:
Background:
-
Plasma 6.x introduced changes to Overview, Desktop Grid, and the handling of Virtual Desktops that rendered much of the old options moot from a code and design standpoint, so this option was left behind. It was also formerly presented as a semi-confusing drop-down, labeled "Pager", and "Custom".
-
With this new design in mind: As far as the Desktop Grid is concerned, we should expect to see a grid, not a list.
Currently, setting up an efficient Grid layout takes several manual steps on the end user's part:
- Open Overview or Desktop Grid and add some desktops using onscreen elements or + key. These present as a linear list by default, matching VD settings and pager.
- System Settings -> Window Management -> Virtual Desktops -> Rows must be manually set to fit the desired desktop count. This affects all VD spatial presentation outside of the Grid including transitions/animations and hotkeys.
The VD layout should be simple and contextual across the effect:
- Are you in Overview? Present desktops as a 1x linear row left and right.
- Are you in Desktop Grid? Present desktops as a Grid to maximize screen space. 2x2, 3x3, 4x4, etc.
- Do you like the old behavior or specific row control in the Grid? Easy option to toggle back.
Refer to MR discussion for UX/design feedback







