Bug 408413 - Bad MarbleQuickItem layout on HighDPI
Summary: Bad MarbleQuickItem layout on HighDPI
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-07 10:02 UTC by rreignier
Modified: 2023-07-07 21:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot of the issue (287.51 KB, image/png)
2019-06-07 10:02 UTC, rreignier
Details
A minimal project to reproduce the issue (1.48 KB, application/zip)
2019-06-07 10:02 UTC, rreignier
Details

Note You need to log in before you can comment on or make changes to this bug.
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