Merge pull request #1943 from PhenomRetroShare/Fix_RsElidedItemDelegateStyleSheet

Fix RSElidedItemDelegate to use StyleSheet as default but defined colors
This commit is contained in:
defnax 2020-05-19 19:28:52 +02:00 committed by GitHub
commit fd6b69bcac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
}
}