Use QScreen from QWindow to handle KisPopupButton positioning
This fixes two issues:
- Explicitly setting screen before showing to ensure the correct devicePixelRatio scaling.
- For detached brush editor, use the screen it was previously moved to instead of forcing it to be shown on the same screen the main window is displayed.
BUG: 441935 https://bugs.kde.org/show_bug.cgi?id=441935
Test Plan
- Open the brush editor popup when main window is on the second monitor and observe that it's positioning and sizing is not messed up.
- Move the detached brush editor to another monitor, close it, then reopen it to observe that it stayed on the other monitor.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. - n/a I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
-
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.