Bug 503868

Summary: Taskbar resize
Product: [Plasma] plasmashell Reporter: joey73199
Component: PanelAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: minor CC: nate, niccolo.venerandi
Priority: LO Keywords: multiscreen
Version First Reported In: 6.3.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Taskbar in bugged state
visual recording
panel settings
fit-width
taskbar with no spacer

Description joey73199 2025-05-07 02:58:15 UTC
Created attachment 181012 [details]
Taskbar in bugged state

For context, I have two monitors.
Samsung G5, 165hz 3440x1440 (Primary Display)
Acer V176L, 75hz 1280x1024
The Samsung G5 powers off the monitor when I press the Power Button
The Acer V176L puts the display to sleep when I press the Power Button
When I turn off both displays, It makes the Acer V176L the Primary Display as the Samsung G5 is powered off and unable to be recognized by my system.

The bug only started appearing after updating my system on May 5th 2025 I started to experience a bug where when I power on my Samsung G5 and when my system switching it to be the Primary Display, The task bar does not properly resize to fit the change in resolution but instead stays the same size as it was on the Acer V176L.

The only manual fix I am aware of is to change the resolution or scale of the display then revert the change to make the taskbar properly resize to fit the entirety of the screen.
Attached file is the task bar as the bug is active.


SOFTWARE/OS VERSIONS
Operating System: Nobara Linux 42
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.5-200.nobara.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X3D 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6600 XT
Comment 1 Nate Graham 2025-05-07 16:26:38 UTC
Does this panel have a fixed custom size? Or is it in "fit contents" mode?
Comment 2 joey73199 2025-05-07 18:45:42 UTC
(In reply to Nate Graham from comment #1)
> Does this panel have a fixed custom size? Or is it in "fit contents" mode?

It is in "Fit Content" mode
Comment 3 Nate Graham 2025-05-07 18:53:01 UTC
If the panel is in "Fit contents" mode, then can you help me understand why you're expecting it to change size when it moves to a different screen?

Is it because you've configured it to show only tasks from the active screen, and the screen it moved to has a different number of open windows on it?
Comment 4 joey73199 2025-05-07 19:09:24 UTC
(In reply to Nate Graham from comment #3)
> If the panel is in "Fit contents" mode, then can you help me understand why
> you're expecting it to change size when it moves to a different screen?
> 
> Is it because you've configured it to show only tasks from the active
> screen, and the screen it moved to has a different number of open windows on
> it?

Prior to updating KDE, "Fit Content" would automatically resize the taskbar to fit my Samsung G5, but after the update it no longer resizes the taskbar under the same settings, but instead stays the same size as my 2nd monitor, which is a much smaller resolution.
Comment 5 Nate Graham 2025-05-07 19:12:42 UTC
"Fit Content" is supposed to fit the content in the panel; it isn't supposed to reflect anything about the monitor geometry, and never has (or if it did, that was a bug).

Perhaps a screen recording would help to clarify whether there's a bug here, or whether the behavior is unexpected but intentional. Can you make one? A phone video would work too, if it's not feasible to do a screen recording due to the need to change the screen setup.
Comment 6 joey73199 2025-05-07 19:22:14 UTC
Created attachment 181037 [details]
visual recording
Comment 7 Nate Graham 2025-05-07 19:34:41 UTC
Thanks for the screen recording.

Are you absolutely sure that panel is using "fit content" mode? If so, it seems to be too wide no matter which screen it's on; it isn't fitting the content in either case in your screen recording. Are you sure it's not actually in "Custom" mode?
Comment 8 joey73199 2025-05-07 20:01:23 UTC
Created attachment 181040 [details]
panel settings

(In reply to Nate Graham from comment #7)
> Thanks for the screen recording.
> 
> Are you absolutely sure that panel is using "fit content" mode? If so, it
> seems to be too wide no matter which screen it's on; it isn't fitting the
> content in either case in your screen recording. Are you sure it's not
> actually in "Custom" mode?

yes, It is set to Fit Content not Custom, Attached a image to show the settings.
Comment 9 Nate Graham 2025-05-07 20:14:08 UTC
Thanks. Then this is getting more confusing! I wonder if there are widgets on the panel causing it to have a minimum size that's too high, and that minimum size just so happens to make the panel roughly the width of the smaller monitor, obscuring the true issue by making it seem like a "fill width" panel. Could you check that?

It might also be helpful to create a new fit-content panel with the default widgets and see if the issue affects that panel too?
Comment 10 joey73199 2025-05-07 20:29:36 UTC
Created attachment 181045 [details]
fit-width

(In reply to Nate Graham from comment #9)
> Thanks. Then this is getting more confusing! I wonder if there are widgets
> on the panel causing it to have a minimum size that's too high, and that
> minimum size just so happens to make the panel roughly the width of the
> smaller monitor, obscuring the true issue by making it seem like a "fill
> width" panel. Could you check that?
> 
> It might also be helpful to create a new fit-content panel with the default
> widgets and see if the issue affects that panel too?

Fit-Width does make it properly scale the taskbar between displays and looks identical to how fit-content used to work prior to the update. 
I included a new video to show that altering the scale or resolution of the display and reverting the change does make the fit-content update properly to fit the entirety of the display.
Comment 11 Nate Graham 2025-05-07 20:34:14 UTC
Thank you, that's very helpful.

In that case, I'm pretty sure I understand what's going on: your original fit-content panel just happens to have the same appearance of a fill-width panel due to how much stuff is on it. When it's on a different screen with more space available, it can limit its width as it would prefer.

If there is a bug here, it's why that panel takes up so much space on the smaller screen. It looks like there's a bunch of empty space in the middle that should be collapsing. So I suspect some of the widgets on the panel are taking up more space than they need to. Can you figure out which widgets are to blame here?
Comment 12 joey73199 2025-05-07 20:46:25 UTC
(In reply to Nate Graham from comment #11)
> Thank you, that's very helpful.
> 
> In that case, I'm pretty sure I understand what's going on: your original
> fit-content panel just happens to have the same appearance of a fill-width
> panel due to how much stuff is on it. When it's on a different screen with
> more space available, it can limit its width as it would prefer.
> 
> If there is a bug here, it's why that panel takes up so much space on the
> smaller screen. It looks like there's a bunch of empty space in the middle
> that should be collapsing. So I suspect some of the widgets on the panel are
> taking up more space than they need to. Can you figure out which widgets are
> to blame here?

the only widgets I have manually added was the ram, cpu, and gpu usage monitors. But after tweaking I do suspect that its the Panel Spacer widget not properly scaling when in Fit-Content?
Comment 13 Nate Graham 2025-05-08 14:21:43 UTC
Well, if you have a spacer in there, its reason for existing is to take up space. :) 

Can you share a screenshot of how the panel looks on the large screen if you remove all the spacers from it?
Comment 14 joey73199 2025-05-09 02:38:24 UTC
Created attachment 181095 [details]
taskbar with no spacer

(In reply to Nate Graham from comment #13)
> Well, if you have a spacer in there, its reason for existing is to take up
> space. :) 
> 
> Can you share a screenshot of how the panel looks on the large screen if you
> remove all the spacers from it?

This is what my taskbar looks like with spacers removed.
Comment 15 Nate Graham 2025-05-09 16:22:05 UTC
OK great, that looks normal.

So I think this is *literally* not a bug, then. :) Everything works as expected, and your specific combination of panel settings made you think it was a bug, but it wasn't!
Comment 16 joey73199 2025-05-09 18:07:20 UTC
(In reply to Nate Graham from comment #15)
> OK great, that looks normal.
> 
> So I think this is *literally* not a bug, then. :) Everything works as
> expected, and your specific combination of panel settings made you think it
> was a bug, but it wasn't!
The spacer widget does not change size when switching between monitors, and it didn't behave like that prior to the update.
But if its not a bug then sorry for wasting your time
Comment 17 Nate Graham 2025-05-09 18:08:40 UTC
To my knowledge it's supposed to work like that, yeah. If it didn't before, that was probably a bug that got fixed!