Created attachment 135234 [details] screen recording STEPS TO REPRODUCE 1. open System Settings > Startup and Shutdown > Autostart 2. click on "+Add" button 3. OBSERVED RESULT A popup opens and covers the clicked button. If I close the popup by clicking on the empty area and click on the same button again, the popup opens above the button as expected. Watch the attached screen recording please. EXPECTED RESULT the popup should always open above "+ Add" button. SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.21.80 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2
Yeah the button should be checkable and the popup should appear above it, as in the Baloo KCM.
Now that's weird. I see that the code is copied verbatim from the Baloo KCM to provide this behavior. I also see that it works properly on the second time you click the button--but not the first.
Looks like something is going wrong inside popup placement. That being said the desktop style has the Menu at 0 height until shown once, this may well be why something is going wrong inside the popup placement. i.e. the first time round the menuHeight is always -`Kirigami.Units.gridUnit * 3`, which is wrong one way or the other I guess. The fusion style doesn't have that problem. From some tinkering I'd say this could be simplified as per the docs [1]. If the menu simply was the child of the menubutton, which I suppose has no downsides since the menu isn't a context menu and thus always attached to the button, the trigger would simply become > onPressed: menu.open() and the position set as a binding, avoiding the problem altogether as the position would simply update once height is correct. > Menu { x:0; y: height > 0 ? -height : Kirigami.Units.gridUnit * 3 Anyway. I'm mostly guessing here. Plus, whatever is wrong with our Menu{} style needs debugging, if fusion doesn't have the Menu at height 0 initially it stands to reason desktop shouldn't either. [1] https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html#popup-positioning
Fixed by Yerrey Dev with https://invent.kde.org/plasma/plasma-workspace/-/commit/908f92f4809418766f53eb48c35c60817fd1cb89 in Plasma 5.24!