Bug 492373

Summary: Desktop Bar overflows off-screen with large amount of desktops
Product: [Plasma] kwin Reporter: Blazer Silving <breakingspell>
Component: effects-overviewAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate
Priority: NOR    
Version: 6.1.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: 16 Desktops in KDE
16 Desktops in MacOS
16 Desktops in KDE
16 Desktops in MacOS

Description Blazer Silving 2024-08-29 16:28:57 UTC
SUMMARY
Since introduction in 5.24, the Overview screen's Desktop Bar will overflow off-screen with extreme desktop counts. While this does not cause a crash or error, it causes controls to draw off-screen. 

With default DPI/no scaling, the horizontal (1 x n) Desktop Bar will overflow at:
2560x1440 - 16 desktops
1920x1080 - 13 desktops
Similar overflows would occur on a left-edge Desktop Bar (when desktops are n x 1 layout), and in a non-linear state (2x2, 3x3, 4x4 grid). A 4x4 grid user with 16 desktops would be the most likely to encounter this issue in practice. 

Screenshots from my Plasma desktop illustrate the issue at 4-9-16 desktop count. 
Similar screenshots from my Macbook demonstrate the same count. 

MacOS's design mitigates overflow in order of appearance of the effects (vice versa as desktops are removed):
-At 10 desktops: shrink previews + zoom/accordion on hover
-At 12 desktops: hide labels unless hovered
-At 16 desktops: prevent creating more desktops

Obviously KDE Plasma is not MacOS, we can find an elegant way to handle this that doesn't just copy Apple. 

I think that reading in the screen dimensions+DPI, then defining a ratio of "desktop count : screen length" could be sufficient to trigger an overflow state, where a solution like a scrollbar container could kick in, or scale the previews down and up in that state. 

I'll help where I can, but it's not a high priority for now.
Comment 1 Blazer Silving 2024-08-29 16:30:11 UTC
Created attachment 173096 [details]
16 Desktops in KDE
Comment 2 Blazer Silving 2024-08-29 16:30:32 UTC
Created attachment 173097 [details]
16 Desktops in MacOS
Comment 3 Blazer Silving 2024-08-29 16:40:29 UTC
Created attachment 173099 [details]
16 Desktops in KDE
Comment 4 Blazer Silving 2024-08-29 16:40:50 UTC
Created attachment 173100 [details]
16 Desktops in MacOS
Comment 5 Blazer Silving 2024-08-29 17:59:08 UTC
Slight update after digging around a bit: the oversized bar IS scrollable with a click+drag. 

No real break, then! 
It could be enhanced with UI arrows/cursor indicators to show the bar is able to be grabbed, and mouse hover on the screen edge could be a more intuitive way to trigger the scroll.
Comment 6 Nate Graham 2024-08-30 04:13:20 UTC

*** This bug has been marked as a duplicate of bug 449908 ***