Bug 493989 - Size of new Weather widget on the desktop is intermittently too small for content after adding location
Summary: Size of new Weather widget on the desktop is intermittently too small for con...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Weather widget (other bugs)
Version First Reported In: 6.2.4
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-02 19:40 UTC by TraceyC
Modified: 2024-12-17 22:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Weather widgets after adding a location (683.91 KB, image/png)
2024-10-02 19:40 UTC, TraceyC
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TraceyC 2024-10-02 19:40:58 UTC
Created attachment 174332 [details]
Weather widgets after adding a location

SUMMARY
Sometimes the size of a newly added Weather Report widget is too small to fit the content, after location is selected

STEPS TO REPRODUCE
1. Add the standard Weather Report widget to the desktop (not panel) 
2. Add a location, from any source
If the problem doesn't happen initially, add another widget and set another location

OBSERVED RESULT
The content is larger than the widget background container

EXPECTED RESULT
The content fits inside the container

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version:  git-master
KDE Frameworks Version:  6.7.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Reproduced on Wayland
This happens even if there is absolutely nothing behind the area the widget is placed, so nothing overlapping

It looks like the right side of the background container might be looking at other widgets on the screen to set the right margin rather than the content

In the screenshot, the widgets for Houston and Charlotte had been added prior to today. The others were all added right before I wrote this up. 
- Added 4 widgets 
- On the first, clicked Configure and chose Boston, Logan. The frame was too small as seen in the screenshot
- Added San Francisco, which was OK. I moved the widget to where it is shown
- Added Whitefeld, that was OK
- Added Atlanta, the frame was too small

When moving the widget, the background will pop out to the size of the information
Comment 1 Nate Graham 2024-10-03 17:01:10 UTC
On the desktop, yes. This doesn't affect the panel widget/system tray representation, thankfully.
Comment 2 Ismael Asensio 2024-10-03 21:06:53 UTC
The default sizing is correct, as it is the same one as the full representation in a panel, given by Layout.minimumWidth/Height.

The problem is with the desktop containment layouting, because it doesn't allow a widget to grow when it collides with another one  or a screen edge.

When adding a new widget (before configuring) it has a very small size, which fits in the space between other widgets. After being configured, a new minimum size is calculated, but the desktop cannot honor it anymore as there is no more space on its current position, so it interrupts resizing.

Can you try to move a "collapsed" widget to a free space elsewhere? The background should get back to normal and not allow to manually resize below that size.

This issue affects every widget but very few have such a changing size between unconfigured and configured states.
Comment 3 Nate Graham 2024-10-03 21:13:46 UTC
> Can you try to move a "collapsed" widget to a free space elsewhere? The background should
> get back to normal and not allow to manually resize below that size.

I can reproduce that.