Diffusion Krita 3d77d9f5bae5

Fix canvas scale in HiDPI mode

Authored by dkazakov on Oct 7 2018, 9:50 PM.

Description

Fix canvas scale in HiDPI mode

Qt has a bit complicated way to deal with openGL widget
in scaled HiDPI mode. The openGL widget's framebuffer is
stored in hardware pixels (physical coordinates), but before
calling paintGL, Qt sets manual scaling with glOrtho that
makes this FBO look as if it is stored in logical pixels.

This patch basically takes it into account by setting
a correct physical resolution in
KisZoomManager::updateScreenResolution(). It has one non-
trivial consequence. Now, when setting zoom to 100% and
having pixel aspect mode activated, Flake coordinate system
does not have 100% zoom, because it is measured in
logical coordinates, but not in physical ones, which are
bigger.

BUG:360541
Fixes T2299

(cherry picked from commit 9d95d8d5386eecba733392c5514f230c82f65ee5)

Details