Simple fix for huge icon sizes
Currently units is based on font metrics except icon size and some SVG parts which use DPI directly. Instead of taking the physical DPI we take the logical DPI which is used for working out font point -> pixel sizes. We can rely on this being correct as otherwise every other app would appear broken. REVIEW: 122799 BUG: 338308 Change-Id: I22f668ccea7d6d15ff475e1368c82964bdde1e60
This commit is contained in:
parent
993301c80b
commit
1ce575cf5a
@ -180,7 +180,7 @@ void Units::updateDevicePixelRatio()
|
||||
// TODO: make it possible to adapt to the dpi for the current screen dpi
|
||||
// instead of assuming that all of them use the same dpi which applies for
|
||||
// X11 but not for other systems.
|
||||
qreal dpi = QGuiApplication::primaryScreen()->physicalDotsPerInchX();
|
||||
qreal dpi = QGuiApplication::primaryScreen()->logicalDotsPerInchX();
|
||||
// Usual "default" is 96 dpi
|
||||
// that magic ratio follows the definition of "device independent pixel" by Microsoft
|
||||
m_devicePixelRatio = (qreal)dpi / (qreal)96;
|
||||
|
Loading…
Reference in New Issue
Block a user