Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
Description
Collect tasks and bugs that are related to improving UI scalability.
B Proposal B): Do it all in the platform plugin, "emulate what Mac does"
- Only allow integer scaling ratio
- rely on font point sizes/font metrics for in-between DPI values
B.1 Pending changes
- App attribute for controlling it: https://codereview.qt-project.org/#/c/91432 : Deferred
B.2 Remaining issues:
- How to opt in, QApplication attributes, etc.
- Adapt styles
2 Other changes (mostly independent of implementation):
Ooops-commits:
Remaining issues independent of approach:
- Important : What do we do with Qt Designer (and come to think of, Qt Creator). If we activate scaling by default, it can be quite misleading. Should it get an unscaled preview. If so, we might have to do stuff by window (Potential workaround: Fork off a sub-process with UiLoader for preview).
- Is it possible to completely adapt the Vista style to DPR scaling at all. Ideally, cached pixmaps should be created with DPR=2 and then correctly rendered. Problem is that it arbitrarily clips and transform with obscure values...
- Polish & example from
QTBUG-38993as manual test / merge with tests/manual high dpi?
Submitted changes for reference
QPA
- Base change (Widgets, gui): 1fec23f9276fe80ea8973bba1f3d2870658a8199 (dev, 6.8.2014, 5.4) https://codereview.qt-project.org/#/c/90938
- XCB (Proposal B): 5.4 ae5f2a66720a4bb22c120bd7d1564652cac00367 5.4: https://codereview.qt-project.org/#/c/92255/ (dev https://codereview.qt-project.org/#/c/90248/)
- Windows: Use Q_DECL_OVERRIDE everywhere before splitting scaling code paths: c67f7c0f0fc34887a4922a269815c460cbe3ccf8 (dev, 29.7.14), https://codereview.qt-project.org/#/c/90649/
- Windows (Proposal B): (5.4, 26.8.2014) c47b04696a9d1dab04c4a59ed9ce4c28aa00fe98 5.4: https://codereview.qt-project.org/93088 (dev https://codereview.qt-project.org/#/c/90790/ )
Style fixes
- Refactor win style: 552639c3590e793023539078bd97aa8b1ba2c2d3 (5.4, 2..9.2014) https://codereview.qt-project.org/93564
- Fix QCursor::pos() on Windows: 83dab766fc263bc085c54158d789fd5a17f52df5 https://codereview.qt-project.org/93456
- Scale system metrics in windows styles: 5.4 176bd1edfadcb68b914a27de75502edeb1081253 (5.4, 5.9.2014) : https://codereview.qt-project.org/#/c/93095/ (dev https://codereview.qt-project.org/#/c/91451/ )
- Scale hardcoded values by DPI in in windows styles: 5.4: 585cef5f901c5860d8f6dce3cd49dcddb7a8481a (5.4, 5.9.2014) https://codereview.qt-project.org/#/c/93096/ (dev https://codereview.qt-project.org/#/c/91693/ )
Widgets
- Fix up QWizard/Windows: 5.4: 2d12ef0be0f1f9abeeae15ffa430b5a96905b0da https://codereview.qt-project.org/#/c/93094/
Documentation
- Documentation: qtdoc cdd142bf15a90b17a1eaab24e1db8aef32f6e31f 5.4: https://codereview.qt-project.org/#/c/93100/ (dev https://codereview.qt-project.org/#/c/89799/ )
- Document @2x image loading: f85f3acd7878f49f0878644905ca27ceb7bc0775 5.4: https://codereview.qt-project.org/#/c/93082/ (dev: https://codereview.qt-project.org/90314 )
Other
- Bump major version of geom: 50e1733dfac8e0810a8a8aace7e9078322965167 (5.4,
8.9.2014) https://codereview.qt-project.org/#/c/94039/ - Add Q_ENUMS to styles for further fixing: 5.4 def5a56b0316edcf95693c86e86b80b338fbbba4 https://codereview.qt-project.org/#/c/93522/
- Add sanity checking to QWidget::restoreGeometry() to prevent invalid sizes when changing scaling, etc: 5.4: ce94cdbe505216787896ed5d2b40fe017d3f3dd1 https://codereview.qt-project.org/93084 , Qt 4.8: https://codereview.qt-project.org/#/c/93508/ [abandoned]
- Fix debug output of QEvent for plugin testing: 14f9c09542bd6cc19430473da9ce4c68f239ec7d (dev, 5.8.2014, 5.4) https://codereview.qt-project.org/#/c/91290/
- Clean up tst_qwidget (to be able to run with scaling 1,2):
- Fix top level leaks: 03ff5b35a5b852f56584484f449997f88e16668d (dev, 25.7.) https://codereview.qt-project.org/#/c/90631
- Fix geometries: 8c336845caccbd1f2b4d9986117dd955e133386a (dev, 1.8.2014, 5.4) https://codereview.qt-project.org/#/c/90231/
- Deferred: Get rid of member widget variable to enable re-running the test with different scaling: https://codereview.qt-project.org/#/c/90137/
- Fix qwindow test: dd99c10c569a5941efa74fb07d5031d58af07141 (dev, 1.8.2014, 5.4) https://codereview.qt-project.org/#/c/91178/
- Improve debug of QImage,etc to show the device pixel ratio: 43e8c1896d5c9c04a78983d10afeb1d5a2112995 (dev, 21.7.2014) https://codereview.qt-project.org/#/c/90268/
- Fix existing manual test: ec190b0da7e39970957fc2a29f745588f493b876 (dev, 21.7.2014) https://codereview.qt-project.org/#/c/90130/
A Proposal A) for reference: Introduce a scaling layer between QPA and QWindow (aka Morten's patch series)
Design considerations: https://docs.google.com/document/d/1d2ymxj-bfWhM1Ssr4ybLFD4nxp4k8Ozl0IAUbVx-ino/pub
A.1 Pending changes (dependent patch chain) adding a scaling layer to Qt to aid existing applications:
- QtGui: https://codereview.qt-project.org/#/c/86107/
- Determine suitable factor: https://codereview.qt-project.org/#/c/89352/
- PdmDevicePixelRatioScaled: https://codereview.qt-project.org/#/c/86574/
- Widget/QPainter: https://codereview.qt-project.org/#/c/86575/
- XCB: https://codereview.qt-project.org/#/c/86108/
- Windows: https://codereview.qt-project.org/#/c/87985/
- Cocoa: https://codereview.qt-project.org/#/c/86576/
- Windows styles: https://codereview.qt-project.org/89721
A.2 Related changes:
- Adapt auto-test of QWindow: https://codereview.qt-project.org/90061
- Refactor QApplication-topLevelAt() f547381806f6251c176e587d6d95b66bb8dfa88c (dev, 18.7.2014) https://codereview.qt-project.org/90101
- Adapt auto-test of QWidget: https://codereview.qt-project.org/90112
A.3 Remaining issues:
- How to best automatically apply scaling (should be opt-in)
- Native widgets are messed up (use option -n to example from qtbug38993)
- Windows: Some Style items are then too big?
- QML Fonts on Windows not looking good
For reference: Allans's patch
- https://codereview.qt-project.org/#/c/91176/
- Content from this patch has been merged into the XCB patch
Attachments
Issue Links
- depends on
-
QTBUG-41076 Documentation shown in assistant/webkit has hard-coded font size and is thus too small on High DPI displays
- Closed
-
QTBUG-41102 FusionStyle: Some off-by-one pixel issues with high devicePixelRatio
- Closed
-
QTBUG-41300 Windows: Region mask on widget broken under devicePixelRatio > 1
- Closed
-
QTBUG-38993 Windows: Fix High DPI issues
- Closed
-
QTBUG-40277 Adapt styles to High DPI
- Closed
- resulted in
-
QTBUG-46615 Implement High DPI scaling v2 (5.6)
- Closed