aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/find
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/find')
-rw-r--r--src/plugins/find/searchresulttreemodel.cpp12
-rw-r--r--src/plugins/find/searchresulttreeview.cpp4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/find/searchresulttreemodel.cpp b/src/plugins/find/searchresulttreemodel.cpp
index 141ff24fa51..ce9d6f9fc7f 100644
--- a/src/plugins/find/searchresulttreemodel.cpp
+++ b/src/plugins/find/searchresulttreemodel.cpp
@@ -252,12 +252,10 @@ QVariant SearchResultTreeModel::data(const SearchResultTreeItem *row, int role)
result = QVariant();
break;
case Qt::TextColorRole:
- if (row->item.useTextEditorFont)
- result = m_color.textForeground;
+ result = m_color.textForeground;
break;
case Qt::BackgroundRole:
- if (row->item.useTextEditorFont)
- result = m_color.textBackground;
+ result = m_color.textBackground;
break;
case ItemDataRoles::ResultLineRole:
case Qt::DisplayRole:
@@ -273,12 +271,10 @@ QVariant SearchResultTreeModel::data(const SearchResultTreeItem *row, int role)
result = row->item.icon;
break;
case ItemDataRoles::ResultHighlightBackgroundColor:
- if (row->item.useTextEditorFont)
- result = m_color.highlightBackground;
+ result = m_color.highlightBackground;
break;
case ItemDataRoles::ResultHighlightForegroundColor:
- if (row->item.useTextEditorFont)
- result = m_color.highlightForeground;
+ result = m_color.highlightForeground;
break;
case ItemDataRoles::SearchTermStartRole:
result = row->item.textMarkPos;
diff --git a/src/plugins/find/searchresulttreeview.cpp b/src/plugins/find/searchresulttreeview.cpp
index 2fa0df88569..281014e95b8 100644
--- a/src/plugins/find/searchresulttreeview.cpp
+++ b/src/plugins/find/searchresulttreeview.cpp
@@ -61,6 +61,10 @@ void SearchResultTreeView::setAutoExpandResults(bool expand)
void SearchResultTreeView::setTextEditorFont(const QFont &font, const SearchResultColor color)
{
m_model->setTextEditorFont(font, color);
+
+ QPalette p = palette();
+ p.setColor(QPalette::Base, color.textBackground);
+ setPalette(p);
}
void SearchResultTreeView::clear()