Fix incorrectly scaled constants on Mac
This fixes several scaled constants on mac that are inherited from commonstyle. (such as toolbutton arrows) It is probably easiest to see when running Windows style on mac. The problem was that the code assumed a default dpi of 96 would be used on all platforms. Change-Id: I83789589009b268dcb1d96629c3ec9e8f968a891 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
67ff460778
commit
3a685dcd5e
@ -77,8 +77,13 @@ QString uniqueName(const QString &key, const QStyleOption *option, const QSize &
|
||||
|
||||
qreal dpiScaled(qreal value)
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
// On mac the DPI is allways 72 so we should not scale it
|
||||
return value;
|
||||
#else
|
||||
static const qreal scale = qreal(qt_defaultDpiX()) / 96.0;
|
||||
return value * scale;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user