Bug 490319 - Task managers widget fill the same horizontal space in the panel in multi row mode as if it were set in one row
Summary: Task managers widget fill the same horizontal space in the panel in multi row...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 6.1.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-07-15 18:20 UTC by nope1000000
Modified: 2024-07-24 01:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1.4
Sentry Crash Report:


Attachments
See the empty space at the right (717.30 KB, image/png)
2024-07-15 18:20 UTC, nope1000000
Details
The widget properly working on Plasma 6.0.3 (154.86 KB, image/jpeg)
2024-07-19 20:52 UTC, nope1000000
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nope1000000 2024-07-15 18:20:20 UTC
Created attachment 171687 [details]
See the empty space at the right

SUMMARY

Task managers widget fill the same horizontal space in the panel in multi row mode as if it were set in one row. It' s only noticeable when panel width is set to adjust to content, because when the panel is set to fill all horizontal space is normal for the task manager to leave empty spaces, but it should not be the case when panel is adjusting to content (like a dock) 

STEPS TO REPRODUCE
1. Force the panel to show windows always on two rows or more
2. Set the panel width to adjust to content
3. Open some programs

OBSERVED RESULT

The widget is occupying the same horizontal space in two rows or more than in one row, which creates a big empty space at the right

EXPECTED RESULT

The widget fills only the exact horizontal space needed to contain the buttons of the opened windows

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Feedora 40
(available in About System)
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Comment 1 Marco Martin 2024-07-18 14:12:31 UTC
how is the taskmanager setting?
How many rows?
is checked "when panel is low on space and thick enough" or "Always when panel is thick enough" ?

currently i can't reproduce the issue with either of those
Comment 2 nope1000000 2024-07-19 07:46:45 UTC
(In reply to Marco Martin from comment #1)
> how is the taskmanager setting?
> How many rows?
> is checked "when panel is low on space and thick enough" or "Always when
> panel is thick enough" ?
> 
> currently i can't reproduce the issue with either of those

- In Appearance all the options are ticked. The one that says "Fill free space" seemed suspicious to me and I try disabling it but nothing changes.
- I normally use 2 rows, but I tried 3 and it happens the same. Also in both cases the widget uses the same horizontal space that it would use if set in a single row.
-"Always when panel is thick enough"

Since you couldn't reproduce it I also checked with the breeze theme and restarting the plasma session to be sure it's not due a theming issue, but the bug happens too with breeze.

It's important to set the panel width to "fit content", since you wouldn't notice weird empty spaces in a panel that uses all horizontal space or with fixed width, as those are going to have empty spaces anyway. I'm not sure this was made clear in the first message because I have the system localization set in spanish.
Comment 3 Nate Graham 2024-07-19 18:55:02 UTC
I can reproduce this issue with a 46px "fit content" panel and an icons-only task manager set to show 2 rows with the "Always when panel is thick enough" setting.

However I'm not sure it's actually an issue. As far as I can tell, this behavior is intentional with an icons-only task manager with that combination of settings.

Are you saying that you'd prefer if the tasks filled up the top row first, before moving onto the bottom row?

If so, this is the purpose of the "When panel is low on space and thick enough" setting, which implements that UX.
Comment 4 nope1000000 2024-07-19 20:50:28 UTC
(In reply to Nate Graham from comment #3)
> I can reproduce this issue with a 46px "fit content" panel and an icons-only
> task manager set to show 2 rows with the "Always when panel is thick enough"
> setting.
> 
> However I'm not sure it's actually an issue. As far as I can tell, this
> behavior is intentional with an icons-only task manager with that
> combination of settings.

It's clearly not intentional since this bug wasn´t present in any Plasma versions prior to 6.1 (All the Plasma 5 branch until 6.0) Also the space occupied by the task manager growing by the same size it would grow if set in single row clearly indicates this behaviour isn´t intentional.

If the task manager would work properly, the widget should grow the exact same horizontal size needed to contain the icons, and it wouldn't contain any empty space at the right

> Are you saying that you'd prefer if the tasks filled up the top row first,
> before moving onto the bottom row?

The task should fill the widget the same as now. It's just that the widget is creating an empty space at the right that it's not needed, didn't happen before Plasma 6.1 and makes the panel size grow too fast when set to "fit content"

Just to be clear, The task manager widget when the panel is set to fit content shouldn't leave any empty space at the right, and it should adapt it's size to the horizontal size needed to contain the task, which depends of the number of rows. But in fact, this is what the widget is actually trying to do, before and now. The actual bug is the widget growing always and regardless of the number of rows, as if it would grow if set in a single row: one space for one task. As it's not considering the number of rows, the result is the widget leaving empty space at the right which is not going to be used.

I'm going to upload an screenshot taken on Plasma 6.0 so you can see how it looks when it's working =P
Comment 5 nope1000000 2024-07-19 20:52:25 UTC
Created attachment 171803 [details]
The widget properly working on Plasma 6.0.3
Comment 6 nope1000000 2024-07-19 20:59:37 UTC
It'd like to clarify too that this bug happens in both the task manager and the icon only task manager
Comment 7 Nate Graham 2024-07-23 18:25:35 UTC
Ahh, I get it now. Can reproduce.

Basically the issue is that the Task Manager widgets take up extra space in forced multi row/column mode, even when on a "fit content" panel, and even with the widget's own "Fill free space on panel" setting disabled.
Comment 8 Bug Janitor Service 2024-07-23 19:16:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2396
Comment 9 Ismael Asensio 2024-07-24 01:11:43 UTC
Git commit 71ddcebf3deb5bfa921bbaa59045397cf4d818ff by Ismael Asensio.
Committed on 23/07/2024 at 18:53.
Pushed by iasensio into branch 'master'.

applets/taskmanager: Fix applet's layout size with multiple rows

The property `Layout.maximumWidth` of the `taskList` didn't take
into account the number of rows. This was compensated later when
calcualting its actual width, but not for the applet's preferred
size, resulting in extra demanded space.

To fix it, move the influence of the rows directly into the property.

This was only noticeable with the settings `forceStripes==true`,
and `fill==false` because in any other combination, either the space
is wanted, or the tasks fills the available space before creating
a new row.

Due to symmetry, the same is done on vertical panels for
'Layout.maximumHeight` and the number of columns.
FIXED-IN: 6.1.4

M  +12   -8    applets/taskmanager/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/71ddcebf3deb5bfa921bbaa59045397cf4d818ff
Comment 10 Ismael Asensio 2024-07-24 01:21:59 UTC
Git commit e1c824a2c36ea3fa8e972341e0273a40171b83dc by Ismael Asensio.
Committed on 24/07/2024 at 01:21.
Pushed by iasensio into branch 'Plasma/6.1'.

applets/taskmanager: Fix applet's layout size with multiple rows

The property `Layout.maximumWidth` of the `taskList` didn't take
into account the number of rows. This was compensated later when
calcualting its actual width, but not for the applet's preferred
size, resulting in extra demanded space.

To fix it, move the influence of the rows directly into the property.

This was only noticeable with the settings `forceStripes==true`,
and `fill==false` because in any other combination, either the space
is wanted, or the tasks fills the available space before creating
a new row.

Due to symmetry, the same is done on vertical panels for
'Layout.maximumHeight` and the number of columns.
FIXED-IN: 6.1.4


(cherry picked from commit 71ddcebf3deb5bfa921bbaa59045397cf4d818ff)

M  +12   -8    applets/taskmanager/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/e1c824a2c36ea3fa8e972341e0273a40171b83dc