Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
-
2d20406f5 (dev), 4928414d9 (6.4)
Description
QIcon has basic high-DPI support, but is in need of modernization and a round of improvements for Qt 6:
- Previous work:
- Qt icon and image versioning support update:
QTBUG-49820
- Qt icon and image versioning support update:
- API: Deprecate "QWindow*"-based overloads, add "qreal devicePixelRatio"-based overloads.
Qt 6 is standardizing on "devicePixelRatio"-type high-dpi support on all platforms (instead of having it as an opt-in mode), which allows using devicePixelRatio in API.- pixmap(QWindow *, QSize, ...) -> pixmap(QSize, qreal dpr, ...)
- API: remove the actualSize(QWindow *window,) overload. Not used in practice, not needed.
- Usage: port code and API to favor QIcon over QPixmap/QImage as much as possible, so that the decision on which variant to use is pushed as far "down" in the stack as possible, where Qt knows which screen (and dpr) the the icon should be drawn to.
- QIcon overloads for QLabel
- Document that QPixmap::paint() should be preferred instead of pixmap() (when applicable)
- Style work?
- Deprecate virtual QPixmap standardPixmap()
- API and implementation: Add support for differating between 1x, 2x, ... pixmaps: Today, QIcon assumes that a pixmap of larger size than a base pixmap can be used both when a visually larger pixmap is needed and when a more detailed pixmap is needed. Depending on the pixmap asset set, this assumption may not hold.
Attachments
Issue Links
- relates to
-
QTBUG-108440 Wrong icon picked in QMenu in multi monitor multi DPI setup (Vista style)
- Closed