Commit a705b4ec authored by Morten Johan Sørvig's avatar Morten Johan Sørvig Committed by Paul Olav Tvete
Browse files

Introduce cross platform high-dpi scaling

Add a coordinate scaling layer to QtGui, which supports 'devicePixelRatio'
type high-dpi on all platforms, in production and also for
development and testing purposes.

High-DPI scaling is opt-in, by setting environment variables:
    QT_SCALE_FACTOR - sets a global scale factor
    QT_AUTO_SCREEN_SCALE_FACTOR - sets per-screen scale factors,
        where the scale factors are provided by the platform plugin.

This QtGui scaling can be used instead of or in addition to scaling
done by the window system. This distinction is not visible to
applications [when they use Qt API], which will see a change in
the value returned by the devicePixelRatio() accessors as usual.

Introduce a new (private to Qt) coordinate system: native pixels.
The coordinate system stack now looks like:
    device-independent pixels (app, upper parts of Qt)
    native pixels (lower parts of Qt Gui, platform plugins)
    device pixels (backing stores and OpenGL)

Add private QHighDpi namespace ...
Showing with 1170 additions and 85 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment