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

SVG Icons strentched in QListViewWidget items

    XMLWordPrintable

Details

    • Windows
    • 298e81192 (dev), a223eca4a (6.9)

    Description

      The icons set in QListWidgetItem appear stretched by 4 pixels when using the Windows native theme. other themes are not affected.
      Native (Windows 11):

      Fusion:

      I've found that Qt alters the size of rectangles used for SE_ItemViewItemDecoration, expanding it by 4 pixels, resulting in the stretched icons

      I've attached a sample app, by default it will run using the native theme, an argument of -f can be used to force fusion theme

      I've attached a patch that removes this adjustment, however, I do not know if this will cause other issues

      Attachments

        1. image-2024-12-06-14-35-33-339.png
          10 kB
          Alastair Barnes
        2. image-2024-12-06-14-36-27-847.png
          8 kB
          Alastair Barnes
        3. qtbase-fix-icon-stretch.patch
          0.7 kB
          Alastair Barnes
        4. qtbug131955-QListIcon-StretchedIcon.zip
          8 kB
          Alastair Barnes
        For Gerrit Dashboard: QTBUG-131955
        # Subject Branch Project Status CR V

        Activity

          People

            santosh.kumar Santosh Kumar
            thelastrar Alastair Barnes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes