mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-17 15:31:20 +00:00
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
This commit is contained in:
parent
a70fd06124
commit
9480a1ee44
|
@ -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,9 +523,13 @@ void KStandardItemListWidget::setTextColor(const QColor& color)
|
|||
|
||||
QColor KStandardItemListWidget::textColor() const
|
||||
{
|
||||
if (m_customTextColor.isValid() && !isSelected()) {
|
||||
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;
|
||||
const QPalette::ColorRole role = isSelected() ? QPalette::HighlightedText : normalTextColorRole();
|
||||
|
|
Loading…
Reference in a new issue