]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use the same text color for selected hidden and non-hidden items
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 2 May 2013 17:27:47 +0000 (19:27 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 2 May 2013 17:28:10 +0000 (19:28 +0200)
This fixes the problem that the names of selected hidden items are
unreadable with some color schemes.

BUG: 305734
FIXED-IN: 4.10.3
REVIEW: 110164

src/kitemviews/kstandarditemlistwidget.cpp

index d36265f567272a58c78e5ac9bbc4d3bf7efb4d91..f0394dfdaba21184393d3100e1ae4ca907d55efa 100644 (file)
@@ -294,7 +294,7 @@ void KStandardItemListWidget::paint(QPainter* painter, const QStyleOptionGraphic
     }
 
     painter->setFont(m_customizedFont);
-    painter->setPen(m_isHidden ? m_additionalInfoTextColor : textColor());
+    painter->setPen(textColor());
     const TextInfo* textInfo = m_textInfo.value("text");
 
     if (!textInfo) {
@@ -523,8 +523,12 @@ void KStandardItemListWidget::setTextColor(const QColor& color)
 
 QColor KStandardItemListWidget::textColor() const
 {
-    if (m_customTextColor.isValid() && !isSelected()) {
-        return m_customTextColor;
+    if (!isSelected()) {
+        if (m_isHidden) {
+            return m_additionalInfoTextColor;
+        } else if (m_customTextColor.isValid()) {
+            return m_customTextColor;
+        }
     }
 
     const QPalette::ColorGroup group = isActiveWindow() ? QPalette::Active : QPalette::Inactive;