diff options
| author | Akseli Lahtinen <[email protected]> | 2025-09-01 14:36:21 +0300 |
|---|---|---|
| committer | Akseli Lahtinen <[email protected]> | 2025-09-02 11:51:52 +0300 |
| commit | 0573dce6d3d4056564b0d7e369f914fb81e83093 (patch) | |
| tree | db9e66ff56caf76bd5c9916bfb16a0438ba106b4 /src/kitemviews | |
| parent | 8b7a88577cecf203767ec2fe332a3ec79d3185fa (diff) | |
KStandardItemListWidget: Color icon only if item isPressed
Due to the new focus changes, our background highlights are more
transparent.
This means that the selected icon color is wrong, since
it's meant for fully opaque background
We should color the icon only when the element is pressed,
which is the only time we use fully opaque background.
BUG: 508418
Diffstat (limited to 'src/kitemviews')
| -rw-r--r-- | src/kitemviews/kstandarditemlistwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index a068e976a..dfb021c7b 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -1104,7 +1104,7 @@ void KStandardItemListWidget::updatePixmapCache() const bool hasFocus = scene()->views()[0]->parentWidget()->hasFocus(); m_pixmap = pixmapForIcon(iconName, QSize(maxIconWidth, maxIconHeight), - m_layout != IconsLayout && isActiveWindow() && isSelected() && hasFocus ? QIcon::Selected : QIcon::Normal); + m_layout != IconsLayout && isActiveWindow() && isPressed() && hasFocus ? QIcon::Selected : QIcon::Normal); } else { if (m_pixmap.width() / m_pixmap.devicePixelRatio() != maxIconWidth || m_pixmap.height() / m_pixmap.devicePixelRatio() != maxIconHeight) { |
