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

QIcon::fromTheme returns pixmaps that are bigger than requested

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 4.7.2, 4.8.0
    • None

    Description

      The icon engine behind icons that are loaded from QIcon::fromTheme does not scale any pixmaps that it returns. When using an icon theme with an incomplete set of icons (for example, only a "128x128" folder), QIcon::pixmap will always return 128x128 pixmaps even if you ask for one of size 22x22.

      This is contrary to the QIcon::pixmap documentation that says "The pixmap might be smaller than requested, but never larger."

      This causes icons in my application to appear too large for users that have custom icon themes:
      http://code.google.com/p/clementine-player/issues/detail?id=1128
      http://code.google.com/p/clementine-player/issues/detail?id=1057
      http://code.google.com/p/clementine-player/issues/detail?id=707
      http://code.google.com/p/clementine-player/issues/detail?id=480

      I've made a patch to make QIcon scale down icons that it loads from themes the same as it does to other icons. Merge request is here:
      http://qt.gitorious.org/qt/qt/merge_requests/2566

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            davidsansome David Sansome
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes