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

QCommonStyle doesn't draw active icon in items view

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2, 6.5.0, 6.5.1
    • Widgets: Styles
    • None
    • Windows

    Description

      Drawing of item's icons in item views performed in QCommonStyle::drawControl under 

      CE_ItemViewItem case:

      // draw the icon
                  QIcon::Mode mode = QIcon::Normal;
                  if (!(vopt->state & QStyle::State_Enabled))
                      mode = QIcon::Disabled;
                  else if (vopt->state & QStyle::State_Selected)
                      mode = QIcon::Selected;
                  QIcon::State state = vopt->state & QStyle::State_Open ? QIcon::On : QIcon::Off;
                  vopt->icon.paint(p, iconRect, vopt->decorationAlignment, mode, state);
      

      As you can see there is no check that an item is under mouse and also mode for icon is never equal to QIcon::Active.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            medyakovvit Vitaly
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes