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

@ -614,10 +614,12 @@ void ChatLobbyDialog::updateParticipantsList()
else
widgetitem = dynamic_cast<GxsIdRSTreeWidgetItem*>(qlFoundParticipants.at(0));
//TODO (Phenom): Add qproperty for these text colors in stylesheets
// As palette is not updated by stylesheet
if (isParticipantMuted(it2->first)) {
widgetitem->setTextColor(COLUMN_NAME,QColor(255,0,0));
widgetitem->setData(COLUMN_NAME, Qt::ForegroundRole, QColor(255,0,0));
} else {
widgetitem->setTextColor(COLUMN_NAME,ui.participantsList->palette().color(QPalette::Active, QPalette::Text));
widgetitem->setData(COLUMN_NAME, Qt::ForegroundRole, QVariant());
}
time_t tLastAct=widgetitem->text(COLUMN_ACTIVITY).toInt();