Bug 434573 - built-in calculator widget can extend beyond main window
Summary: built-in calculator widget can extend beyond main window
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.1
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-18 09:18 UTC by Andriy Gapon
Modified: 2021-03-20 11:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.2


Attachments
screenshot when maximized on a left screen (19.88 KB, image/png)
2021-03-18 09:18 UTC, Andriy Gapon
Details
screenshot of non-maximized window (66.92 KB, image/png)
2021-03-18 09:19 UTC, Andriy Gapon
Details
screenshot when maximized on the right screen (no problem) (15.59 KB, image/png)
2021-03-18 09:20 UTC, Andriy Gapon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Gapon 2021-03-18 09:18:43 UTC
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
Comment 1 Andriy Gapon 2021-03-18 09:19:29 UTC
Created attachment 136812 [details]
screenshot of non-maximized window
Comment 2 Andriy Gapon 2021-03-18 09:20:09 UTC
Created attachment 136813 [details]
screenshot when maximized on the right screen (no problem)
Comment 3 Andriy Gapon 2021-03-18 09:23:12 UTC
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.
Comment 4 Thomas Baumgart 2021-03-19 17:42:22 UTC
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
Comment 5 Andriy Gapon 2021-03-19 17:46:00 UTC
Thank you very much!

By the way, the calendar widget seems to have a similar issue.
Comment 6 Thomas Baumgart 2021-03-20 11:34:58 UTC
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