diff options
| author | Frank Reininghaus <[email protected]> | 2013-05-02 19:27:47 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2013-05-02 19:28:10 +0200 |
| commit | 9480a1ee44e285d2ab4eb1abf98e6e0386fc0c1e (patch) | |
| tree | ed63a3e1ec150ef4a919588aec67ba7c86efc0d9 /src | |
| parent | a70fd061243d4e321b207bc6a3139e2c89825494 (diff) | |
Use the same text color for selected hidden and non-hidden items
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/kitemviews/kstandarditemlistwidget.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index d36265f56..f0394dfda 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -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; |
