Fix RSElidedItemDelegate to use StyleSheet as default but defined colors

if they are.

If none, use Base Delegate.
This commit is contained in:
Phenom 2020-05-16 19:43:27 +02:00
parent 4f25ab3fe8
commit 384ae46706
14 changed files with 301 additions and 203 deletions

View file

@ -415,9 +415,8 @@ void SearchDialog::download()
std::cout << *it << "-" << std::endl;
QColor foreground = textColorDownloading();
QBrush brush(foreground);
for (int i = 0; i < item->columnCount(); ++i)
item->setForeground(i, brush);
item->setData(i, Qt::ForegroundRole, foreground );
}
}
}
@ -1269,10 +1268,9 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
foreground = textColorHighSources();
}
QBrush brush(foreground);
for (int i = 0; i < item->columnCount(); ++i)
{
item->setForeground(i, brush);
item->setData(i, Qt::ForegroundRole, foreground);
}
}
@ -1355,10 +1353,9 @@ void SearchDialog::insertFile(qulonglong searchId, const FileDetail& file, int s
}
if (setForeground) {
QBrush brush(foreground);
for (int i = 0; i < item->columnCount(); ++i)
{
item->setForeground(i, brush);
item->setData(i, Qt::ForegroundRole, foreground);
}
}