Bug 500390 - It's not ideal that the size of other widgets determines whether a centered Kickoff's popup actually opens centered on the screen
Summary: It's not ideal that the size of other widgets determines whether a centered K...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 6.3.1
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-19 10:34 UTC by agarplayerarlon
Modified: 2025-03-14 00:42 UTC (History)
6 users (show)

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


Attachments
Picture of the issue. (1.20 MB, image/png)
2025-02-19 10:34 UTC, agarplayerarlon
Details
normal behavior (1.22 MB, image/png)
2025-02-19 18:37 UTC, agarplayerarlon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description agarplayerarlon 2025-02-19 10:34:05 UTC
Created attachment 178576 [details]
Picture of the issue.

SUMMARY
If I open Wine any app, the application launcher menu gets shifted to the middle of the screen instead of its normal position, the same issue also happens when Kate is open


STEPS TO REPRODUCE
1.  Open a Wine app or Kate
2.  Open the application launcher

OBSERVED RESULT
See it shifted to the middle of the screen

EXPECTED RESULT
See it in the right position, and not in the middle of the screen

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: CachyOS
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
I am using Wayland
Comment 1 agarplayerarlon 2025-02-19 14:47:07 UTC
I've discovered that this issue happens when Google Chrome Unstable is installed as a flatpak is open too
Comment 2 agarplayerarlon 2025-02-19 14:52:16 UTC
(In reply to agarplayerarlon from comment #1)
> I've discovered that this issue happens when Google Chrome Unstable is
> installed as a flatpak is open too

also I've just discovered that is happens on x11 too, so it happens both on x11 and Wayland
Comment 3 TraceyC 2025-02-19 18:28:31 UTC
Note: The panel setup in the screenshot is
Bottom, centered, floating, fit to content

I'm not able to reproduce this on git-master  with Kate. The menu appears in the same place whether it's open or no apps are open.

Can you please attach another screenshot showing how the menu appears when you have no apps open (where it's in the right place)?
Thanks
Comment 4 agarplayerarlon 2025-02-19 18:37:28 UTC
Created attachment 178603 [details]
normal behavior
Comment 5 agarplayerarlon 2025-02-19 18:38:21 UTC
> Can you please attach another screenshot showing how the menu appears when
> you have no apps open (where it's in the right place)?
> Thanks

added
Comment 6 Nate Graham 2025-02-19 20:04:13 UTC
Hmm, in fact your screenshot depicts what's supposed to be happening! What's going on here is that with a panel in "fit contents" mode, when you have enough apps open (any apps), the panel becomes wide enough that Kickoff is capable of being centered on the screen without either of its edges going beyond the panel edges. And when it can do that, it does do that.
Comment 7 agarplayerarlon 2025-02-19 21:18:19 UTC
(In reply to Nate Graham from comment #6)

thank you for your answer, but isn't it a weird implementation? Because I will have the menu spawn always in different locations, sometimes more on the left of the screen, and when I have enough apps open on the panel then it automatically opens in the middle.

I would prefer to have a set position of the menu, not that it automatically changes position without my "permission".

For me having the separate option to set it to always spawn like in the "Picture of the issue", or to set it to always spawn it in the middle of the screen would look like a better implementation, and maybe have an "automatic" option set as default, where it keeps acting like it does now, but at least you would have the option to set it in a fixed position if you don't like the current behavior, which I don't.
Comment 8 Nate Graham 2025-02-19 21:20:03 UTC
Yeah, it is a bit magical, and vulnerable to the position changing when the position of the Kickoff button changes due to more apps being open.

What do you think, Niccolò?
Comment 9 agarplayerarlon 2025-02-19 21:28:20 UTC
or me having the separate option to set it to always spawn like in the
> "Picture of the issue", or to set it to always spawn it in the middle of the
> screen

I made a mistake writing, I meant the "normal behavior" picture, so that I could have an option to set it to always spawn on top of the kickoff icon (like in the "normal behavior") picture, an option to always have it spawn in the middle of the screen, and an automatic option that is a mix of the two, which is the current behavior
Comment 10 cwo 2025-02-20 09:41:59 UTC
It seems to me that "items change their position as applications are opened or closed" is the defining characteristic of center-aligned fit-to-content panels (with widgets that change width like a task manager). If there's no apps open or pinned, the menu is going to be in the middle of the screen, and if I have 20 open it'll be way toward the corner. If the user does not want that, they should use a mode that does not do that (such as having task manager/panel left-aligned).

The current behavior does not seem optimal though in that it has such a clear mode switch. I think it would make sense to have the popup (in narrow panel mode) centered on the center of the panel, rather than the center of the kickoff item (as long as there is enough space, of course. That way we would get the popup gradually shifting toward the screen edge as the number of task manager entries (/panel width) increases.
Comment 11 Nate Graham 2025-02-26 18:34:40 UTC
Yeah, I think that probably make sense to make the behavior deterministic.
Comment 12 Bug Janitor Service 2025-03-05 22:32:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1282
Comment 13 Niccolò Venerandi 2025-03-11 18:57:40 UTC
Git commit d77a9627464c34a529c4732ca9a54107ff90e211 by Niccolò Venerandi.
Committed on 11/03/2025 at 18:56.
Pushed by niccolove into branch 'master'.

Center vertically/horizontally PopupPlasmaWindows when they do not fit boundaries

Previously, whenever a PopupPlasmaWindow would not fit the given boundary, it
would be left-aligned to the parent element. This was not intuitive and would
be a significant change to when the popup could fit the boundary. For a better
transition, we vertically/horizontally center align the popup to the given
boundary when it's not possible to fit completely within it.

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

https://invent.kde.org/plasma/libplasma/-/commit/d77a9627464c34a529c4732ca9a54107ff90e211