Details
-
Epic
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
-
Scalable UI for Qt
Description
Overall goal:
Improve support for scalable UI by adding support for scaling at the QWindow level. This will enable fine-grained control over where and when scaling is applied, using C++ or QML API. In addition we can also support more advanced scaling modes where Qt computes the scale factor based on window size hints.
Existing support:
- Coordinate system scaling at the QScreen level
- API: setting QT_SCALE_FACTOR at application startup
- Graphics pipeline supports drawing at any DPR, with some limitations (widgets/raster, native styles)
- Qt for WebAssembly supports page zoom: can be used as a demo/test case.
Proposed changes:
- Formalize/document coordinate system scaling by introducing internal and external coordinate systems. The existing QScreen coordinate system scaling implementation uses this approach, although it is not documented using these terms.
- Add support for scaling the QWindow coordinate system.
- Add C++ API for setting per-window scale factors
- Add support for computing the window scale factor based on minimum/maximum size and available size.
Out of scope:
- Adding additional requirements for raster / widgets / styles beyond what is already required for e.g. Windows support.
Coordinate System Explainer:
TODO
Prototype: