Revert "Work-around unfocused item vew colours with Kantum"

This reverts commit 526c662dff.
This commit is contained in:
Craig Drummond
2017-09-10 18:54:50 +01:00
committed by Craig Drummond
parent 4ee7ee5609
commit c98b3da6fa
3 changed files with 1 additions and 27 deletions

View File

@@ -323,15 +323,7 @@ void GroupedViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
#ifdef Q_OS_WIN
QColor textColor(option.palette.color(QPalette::Text));
#else
bool active = option.state&QStyle::State_Active;
#ifdef Q_OS_LINUX
if (!active && view && view->topLevelWidget() && view->topLevelWidget()->isActiveWindow()) {
active=true;
}
#endif
QColor textColor(option.palette.color(active ? QPalette::Active : QPalette::Inactive, option.state&QStyle::State_Selected ? QPalette::HighlightedText : QPalette::Text));
QColor textColor(option.palette.color(option.state&QStyle::State_Selected ? QPalette::HighlightedText : QPalette::Text));
#endif
QTextOption textOpt(Qt::AlignVCenter);
QRect r(option.rect.adjusted(constBorder+4, constBorder, -(constBorder+4), -constBorder));