Bug 494338

Summary: When using a small left or top aligned panel, larger widget popups and tooltips go off left or top screen edge
Product: [Plasma] plasmashell Reporter: Travis Miller <tmiller0162>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: anonymx, drogen_5, joanenric2005, nate, niccolo.venerandi, pasha.2ovchinnikov, sphendragon
Priority: VHI Keywords: regression
Version: 6.2.0   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.1
Sentry Crash Report:
Attachments: Above is the application launcher, below is hovered Audio Volume

Description Travis Miller 2024-10-09 09:29:21 UTC
Created attachment 174562 [details]
Above is the application launcher, below is hovered Audio Volume

STEPS TO REPRODUCE
1. Create a left-aligned panel with Fit Content or a small Custom Size 
2. Put widgets like the Application Launcher or Audio Volume on it
3. Hover over Audio Devices or click on Application Launcher

OBSERVED RESULT
Information is displayed off-screen

EXPECTED RESULT
The windows align to the screen edge and are fully visible

SOFTWARE/OS VERSIONS
Linux: OpenSUSE Tumbleweed
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Comment 1 snowlue 2024-10-09 20:23:24 UTC
Confirming. 

Operating System: KDE neon 6.2
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Comment 2 Sandro 2024-10-10 13:19:14 UTC
This only seems to happen when the panel is smaller than the width of the widget. For some reason the widget aligns itself to the right of the panel when this is the case, causing this issue.
Comment 3 Nate Graham 2024-10-10 18:40:40 UTC
*** Bug 494402 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2024-10-10 19:38:12 UTC
*** Bug 494477 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2024-10-10 21:42:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1209
Comment 6 Nate Graham 2024-10-11 15:25:04 UTC
Git commit a345268b8da7b3769d9766d768a931d3cef856c6 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 11/10/2024 at 15:25.
Pushed by ngraham into branch 'master'.

Only constrain popups to parent windows when there's enough space to do so

Otherwise, they will be aligned to the right side of the parent window,
even in conditions where it does not make sense to do so. As an example,
widgets in very small panels.
FIXED-IN: 6.2.1

M  +7    -6    src/plasmaquick/transientplacementhint.cpp

https://invent.kde.org/plasma/libplasma/-/commit/a345268b8da7b3769d9766d768a931d3cef856c6
Comment 7 Nate Graham 2024-10-11 15:25:27 UTC
Git commit 00357d62022e8c7d39470011999bc7c70a5f6b82 by Nate Graham.
Committed on 11/10/2024 at 15:25.
Pushed by ngraham into branch 'Plasma/6.2'.

Only constrain popups to parent windows when there's enough space to do so

Otherwise, they will be aligned to the right side of the parent window,
even in conditions where it does not make sense to do so. As an example,
widgets in very small panels.
FIXED-IN: 6.2.1


(cherry picked from commit a345268b8da7b3769d9766d768a931d3cef856c6)

a41b675c Only constrain popups to parent windows when there's enough space to do so

Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com>

M  +7    -6    src/plasmaquick/transientplacementhint.cpp

https://invent.kde.org/plasma/libplasma/-/commit/00357d62022e8c7d39470011999bc7c70a5f6b82
Comment 8 Nicolas Fella 2024-10-12 14:18:54 UTC
*** Bug 494376 has been marked as a duplicate of this bug. ***