Modify

Opened 8 weeks ago

Closed 7 weeks ago

Last modified 7 weeks 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 8 weeks 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 8 weeks 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)

Changed 8 weeks ago by johsin18

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

comment:1 Changed 8 weeks ago by johsin18

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 Changed 8 weeks ago by simon04

Milestone: 20.06

Thank you! I'll take a look tomorrow…

Changed 8 weeks ago by johsin18

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

comment:3 Changed 8 weeks ago by johsin18

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 Changed 7 weeks ago by simon04

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 Changed 7 weeks ago by simon04

Thank you!

comment:6 Changed 7 weeks ago by simon04

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.