diff options
| author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2021-03-04 15:30:48 +0100 |
|---|---|---|
| committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2021-03-16 13:11:06 +0100 |
| commit | ad10fd2a6f78d48866e59f843acb0248120074ce (patch) | |
| tree | 0ca67fea742f919873859b6ded5a1f75dd27ee85 /src/opengl/qopenglversionfunctions.cpp | |
| parent | 0bd705d91bc7a883a90abf3a6a6f638301fe2f75 (diff) | |
Round physical dpi when calculating scale factor
(For the QT_USE_PHYSICAL_DPI use case)
The physical DPI is nominally computed from the physical
screen size, however when QT_USE_PHYSICAL_DPI is set
that size has typically been overridden with a fake
size by the user, such that the resulting DPI calculation
will yield some specific integer DPI.
Round this DPI value in order to arrive at a nice scale
factor, e.g. 144/96 = 1.5 instead of 144.01/96 = 1.5001
Change-Id: I665394e98a818b3a8f46408f3193cac4411f458d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/opengl/qopenglversionfunctions.cpp')
0 files changed, 0 insertions, 0 deletions
