Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#19360 closed enhancement (fixed)

[PATCH] Calculating default zoom offset should use existing code infrastructure for HiDPI

Reported by: johsin18 Owned by: team
Priority: normal Milestone: 20.06
Component: Core imagery Version:
Keywords: Cc: simon04

Description

#18720 added PlatformHook.isHighDpiDisplay(). Let's rather use the existing infrastructure in the HiDPISupport class.
In addition, always setting a zoom offset of 2 whenever the scaling is not exactly identity, falls short in many cases. See the attached patch for my suggested enhancement.

Attachments (2)

default-zoom-offset-based-on-HiDPISupport.patch (5.4 KB ) - added by johsin18 5 years ago.
Patch for setting the default zoom offset based on HiDPISupport class.
zoom-taking-screen-scaling-into-account.patch (3.5 KB ) - added by johsin18 5 years ago.
More elegant patch, taking screen scaling into account directly, not the approximate approach via zoom offset.

Download all attachments as: .zip

Change History (8)

by johsin18, 5 years ago

Patch for setting the default zoom offset based on HiDPISupport class.

comment:1 by johsin18, 5 years ago

Summary: Calculating default zoom offset should use existing code infrastructure for HiDPI[PATCH] Calculating default zoom offset should use existing code infrastructure for HiDPI

comment:2 by simon04, 5 years ago

Milestone: 20.06

Thank you! I'll take a look tomorrow…

by johsin18, 5 years ago

More elegant patch, taking screen scaling into account directly, not the approximate approach via zoom offset.

comment:3 by johsin18, 5 years ago

Actually, it would be even better to take screen scaling into account more directly (see my new patch, which does not even use HiDPISupport).
It also improves the "Zoom to native resolution" functionality. However, this patch is more intrusive, and would require more testing. Also, people that have set the zoom offset to 2 already manually, might download too large imagery without really noticing.
In any case, we should remove PlatformHook.isHighDpiDisplay() ASAP before some plugin starts using it and we cannot get rid of it anymore.

comment:4 by simon04, 5 years ago

Resolution: fixed
Status: newclosed

In 16619/josm:

fix #19360 - Calculating default zoom offset should use existing code infrastructure for HiDPI (patch by johsin18)

comment:5 by simon04, 5 years ago

Thank you!

comment:6 by simon04, 5 years ago

In 16620/josm:

see #19360 - Fix NPE in TileCoordinateConverter

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.