Created attachment 136811 [details] screenshot when maximized on a left screen The built-in calculator widget can extend beyond the main window. That can be inconvenient when kmymoney is maximized on a wrong screen in a multi-monitor configuration. I have a dual monitor setup with the monitors positioned left/right of each other. Attached screenshots show how the calculator is positioned when a main kmymoney window is not maximized, maximized on a left screen and maximized on a right screen. I hope that the screenshots demonstrate the problem. Especially, how a part of the calculator goes to the wrong screen. FreeBSD/KDE Plasma: KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.79.0 Qt Version: 5.15.2
Created attachment 136812 [details] screenshot of non-maximized window
Created attachment 136813 [details] screenshot when maximized on the right screen (no problem)
Comment on attachment 136811 [details] screenshot when maximized on a left screen In the screenshot when kmymoney is maximized on the left screen we can see that a part of the calculator covers the panel at the bottom and a prt of the calculator is beyond the screenshot because it went over the screen edge to the right screen.
Git commit 75412b7efc7d32ca41c575f44ca788736c540237 by Thomas Baumgart. Committed on 19/03/2021 at 17:42. Pushed by tbaumgart into branch '5.1'. Don't overlap calculator widget over screen border When using multiple screens, the calculator widget could overlap the border between the screen. This change prevents this scenario. FIXED-IN: 5.1.2 M +2 -2 kmymoney/widgets/amountedit.cpp https://invent.kde.org/office/kmymoney/commit/75412b7efc7d32ca41c575f44ca788736c540237
Thank you very much! By the way, the calendar widget seems to have a similar issue.
Git commit 53b54ebdf8549fc5e4510ddf2af2c51981b76962 by Thomas Baumgart. Committed on 20/03/2021 at 11:34. Pushed by tbaumgart into branch '5.1'. Added general mechanism to position popup widgets This allows to place popup widgets relative to one of the corners of a base widget while making sure that the popup does stay on one screen. Apply this method to calculator and date popups. M +2 -1 kmymoney/widgets/CMakeLists.txt M +3 -20 kmymoney/widgets/amountedit.cpp M +3 -18 kmymoney/widgets/kmymoneydateinput.cpp A +92 -0 kmymoney/widgets/popuppositioner.cpp [License: GPL(v2.0+)] A +40 -0 kmymoney/widgets/popuppositioner.h [License: GPL(v2.0+)] https://invent.kde.org/office/kmymoney/commit/53b54ebdf8549fc5e4510ddf2af2c51981b76962