Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43632

QIconEngine has no access to the devicePixelRatio

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • Not Evaluated
    • None
    • 5.4.0
    • GUI: Painting
    • None
    • Qt 5.4 on Kubuntu 15.04

    Description

      The QIconEngine has no way to access the devicePixelRatio of a requested pixmap for an icon. QIcon::pixmap() just requests a larger pixmap from the QIconEngine.

      For instance, a 16x16 icon is typically less detailed (eg. in case of a "Music folder" it would just show a note rather than a folder with a note) but since a 32x32 pixmap will be requested without any information on what size the eventual physical display will be, the QIconEngine will return a more detailed pixmap which then has the same physical size as the 16x16 on a low dpi screen and thus is hard do recognize due to its small details.

      It is perfectly fine to request a larger pixmap but when you provide a custom icon engine you should be able to distinguish between "legitimate 32x32 request" or "16x16 request at double size" so you can act accordingly, especially when it's an SVG icon theme.

      Attachments

        For Gerrit Dashboard: QTBUG-43632
        # Subject Branch Project Status CR V

        Activity

          People

            sletta Gunnar Sletta
            broulik Kai Uwe Broulik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes