Bug 422447

Summary: Compact switcher layout does not correctly adjust height and width
Product: [Plasma] kdeplasma-addons Reporter: Michael D <nortexoid>
Component: Task SwitchersAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: isma.af, nate
Priority: NOR    
Version: 5.18.5   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.25.3
Sentry Crash Report:
Attachments: Vertical and horizontal whitespace shown

Description Michael D 2020-06-04 10:23:48 UTC
Ideally, the width and height of the tabbox should fit exactly around all of the entries with no whitespace and not eliding text in a row unless that row exceeds the maximum width of the tabbox. This is how it works with many other layouts such as "Large icons". The attached screenshot shows both vertical and horizontal whitespace.

I also notice that what whitespace is shown is not consistent and can change when restarting kwin, even when the same entries are shown in the same order.
Comment 1 Michael D 2020-06-04 10:24:24 UTC
Created attachment 129042 [details]
Vertical and horizontal whitespace shown
Comment 2 Bug Janitor Service 2022-06-28 20:34:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/185
Comment 3 Ismael Asensio 2022-06-28 22:43:34 UTC
Git commit 25f61ed48d9ce77d569ea9343ad3cbfb4996e78c by Ismael Asensio.
Committed on 28/06/2022 at 22:39.
Pushed by iasensio into branch 'master'.

switchers/compact: Fix dialog sizes not getting updated

Use TextMetrics to calculate text sizes and update the longest caption
between different calls to the switcher (on visible changes).

Also remove the minimum height constraint (20% of the screen).
FIXED-IN: 5.25.3

M  +37   -54   windowswitchers/compact/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/commit/25f61ed48d9ce77d569ea9343ad3cbfb4996e78c
Comment 4 Ismael Asensio 2022-06-28 22:44:12 UTC
Git commit 8fd7c783f6f21fac7eb8c6761902942db1ecea2b by Ismael Asensio.
Committed on 28/06/2022 at 22:44.
Pushed by iasensio into branch 'Plasma/5.25'.

switchers/compact: Fix dialog sizes not getting updated

Use TextMetrics to calculate text sizes and update the longest caption
between different calls to the switcher (on visible changes).

Also remove the minimum height constraint (20% of the screen).
FIXED-IN: 5.25.3


(cherry picked from commit 25f61ed48d9ce77d569ea9343ad3cbfb4996e78c)

M  +37   -54   windowswitchers/compact/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/commit/8fd7c783f6f21fac7eb8c6761902942db1ecea2b