Bug 408413

Summary: Bad MarbleQuickItem layout on HighDPI
Product: [Applications] marble Reporter: rreignier <rre>
Component: generalAssignee: marble-bugs
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: Screenshot of the issue
A minimal project to reproduce the issue

Description rreignier 2019-06-07 10:02:21 UTC
Created attachment 120651 [details]
Screenshot of the issue

SUMMARY

On Windows with a screen screen scaled to 150% (HighDPI), using Marble in a QML Application with MarbleQuickItem, the size of the map do not fill the required size an its size changes while moving around on the map.

STEPS TO REPRODUCE
1. Include a MarbleQuickItem in a QML application
2. Add QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
3. Change Windows screen scale to 150%

OBSERVED RESULT

The map do not fill all the reserved space and moving around changes the map size.

Not that the input events are also shifted, not on right map position.

EXPECTED RESULT

The map should use all the space.

SOFTWARE/OS VERSIONS
Windows: 10
Qt Version: 5.12.3

ADDITIONAL INFORMATION

Tested with Marble 0.22 and latest git master branch and Qt 5.12.0 and 5.12.3.
Comment 1 rreignier 2019-06-07 10:02:49 UTC
Created attachment 120652 [details]
A minimal project to reproduce the issue
Comment 2 Torsten Rahn 2023-07-06 20:06:31 UTC
Git commit 41bfa5e7f1bdf161776f76beed571319f9744dbc by Torsten Rahn.
Committed on 06/07/2023 at 20:06.
Pushed by rahn into branch 'master'.

Should fix: Bad MarbleQuickItem layout on HighDPI

This fix tries to be minimally invasive to avoid possible side-effects.
Thanks to Viktorija Lerotić for helping to get this fixed.

M  +5    -1    src/lib/marble/declarative/MarbleQuickItem.cpp

https://invent.kde.org/education/marble/-/commit/41bfa5e7f1bdf161776f76beed571319f9744dbc
Comment 3 Torsten Rahn 2023-07-07 21:04:49 UTC
Git commit e540f6ee12a23611df28df9f06bd408ac836f3a7 by Torsten Rahn, on behalf of Torsten Rahn.
Committed on 07/07/2023 at 21:04.
Pushed by rahn into branch 'master'.

Improvement over 41bfa5e7f1bdf161776f76beed571319f9744dbc.
More comprehensive fix for MarbleQuickItem on HighDPI.

M  +15   -4    src/lib/marble/declarative/MarbleQuickItem.cpp

https://invent.kde.org/education/marble/-/commit/e540f6ee12a23611df28df9f06bd408ac836f3a7