]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Do use QIcon::Selected for non-icon view
authorKai Uwe Broulik <kde@privat.broulik.de>
Mon, 10 Sep 2018 08:22:58 +0000 (10:22 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Mon, 10 Sep 2018 08:22:58 +0000 (10:22 +0200)
Fixes a regression introduced by not using the selected state.
The views other than icon view actually do have a proper highlighted background.

Differential Revision: https://phabricator.kde.org/D15387

src/kitemviews/kstandarditemlistwidget.cpp

index 12bd9d04fc5fc8d4ed986e7effc7c95d92a2caea..8d943ae16dd2cdb788a5cc8eb9c4d02b18344fbe 100644 (file)
@@ -966,7 +966,7 @@ void KStandardItemListWidget::updatePixmapCache()
                 iconName = QStringLiteral("unknown");
             }
             const QStringList overlays = values["iconOverlays"].toStringList();
-            m_pixmap = pixmapForIcon(iconName, overlays, maxIconHeight, QIcon::Normal);
+            m_pixmap = pixmapForIcon(iconName, overlays, maxIconHeight, m_layout != IconsLayout && isActiveWindow() && isSelected() ? QIcon::Selected : QIcon::Normal);
 
         } else if (m_pixmap.width() / m_pixmap.devicePixelRatio() != maxIconWidth || m_pixmap.height() / m_pixmap.devicePixelRatio() != maxIconHeight) {
             // A custom pixmap has been applied. Assure that the pixmap