Bug 487310 - Plasma Panel has weird extra space at plasmashell startup when using icons only task manager
Summary: Plasma Panel has weird extra space at plasmashell startup when using icons on...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 487361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-21 08:37 UTC by Akseli Lahtinen
Modified: 2024-06-01 20:58 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.1


Attachments
Extra space at the end of icons only task manager (195.10 KB, image/png)
2024-05-21 08:37 UTC, Akseli Lahtinen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Akseli Lahtinen 2024-05-21 08:37:03 UTC
Created attachment 169673 [details]
Extra space at the end of icons only task manager

SUMMARY
When using icons only task manager in a floating fit-content panel with no other items in it, it shows extra space at startup.

The extra space goes away the moment user opens a task that is NOT pinned at the task manager, or opens up panel settings.

If panel is not floating, the icons only task manager icons are very small.

Also likely related, but if screen is turned off and back on again after some time, all the icons disappear and the panel gets absurdly small.

STEPS TO REPRODUCE
1. Set a panel at bottom of screen with icons only task manager, no other applets
2. Set panel width to "Fit content" 
3. Set panel to floating
4. Restart plasmashell

OBSERVED RESULT
As long as there is no tasks open, or if the tasks open are only pinned tasks, there will be extra space.

EXPECTED RESULT
The panel would resize correctly.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600

ADDITIONAL INFORMATION

In /kde/src/plasma-desktop/applets/taskmanager/package/contents/ui/main.qml around line 435, if i set the Layout.maximumWidth manually to 96*15 (panel thickness * how many tasks i have pinned), and Layout.maximumHeight to 96 (panel thickness), things seem to work fine for me when loading.

It seems like some sizes are miscalculated or just not found proper.
Comment 1 Akseli Lahtinen 2024-05-22 07:41:00 UTC
The bug seems to be in `kde/src/plasma-workspace/shell/panelview.cpp`

In `PanelView::resizeEvent`, removing the following fixes the issue.

```cpp
//const QPoint pos = geometryByDistance(0).topLeft();
//setPosition(pos);
```

 However this causes the window preview hover popup to be in wrong place.
Comment 2 Bug Janitor Service 2024-05-22 09:24:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4338
Comment 3 Akseli Lahtinen 2024-05-22 15:08:40 UTC
*** Bug 487361 has been marked as a duplicate of this bug. ***
Comment 4 Akseli Lahtinen 2024-05-23 12:34:15 UTC
Fixed with https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4344