Moved most of the hardcoded colors of lists and trees to the file qss.default (with help from braindead).

Now the stylesheet can redefine these colors.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5843 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-11-19 16:01:21 +00:00
parent 9c1d702128
commit a8d1d05405
19 changed files with 387 additions and 104 deletions

View file

@ -267,6 +267,19 @@ void ForumsDialog::processSettings(bool bLoad)
m_bProcessSettings = false;
}
void ForumsDialog::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::StyleChange:
CalculateIconsAndFonts();
break;
default:
// remove compiler warnings
break;
}
}
void ForumsDialog::forumListCustomPopupMenu( QPoint /*point*/ )
{
QMenu contextMnu( this );
@ -684,20 +697,20 @@ void ForumsDialog::CalculateIconsAndFonts(QTreeWidgetItem *pItem, bool &bHasRead
if (!IS_FORUM_SUBSCRIBED(subscribeFlags)) {
qf.setBold(false);
pItem->setTextColor(i, Qt::black);
pItem->setTextColor(i, textColorNotSubscribed());
} else if (bUnread) {
qf.setBold(true);
pItem->setTextColor(i, Qt::black);
pItem->setTextColor(i, textColorUnread());
} else if (bMyUnreadChilddren) {
qf.setBold(true);
pItem->setTextColor(i, Qt::gray);
pItem->setTextColor(i, textColorUnreadChildren());
} else {
qf.setBold(false);
pItem->setTextColor(i, Qt::gray);
pItem->setTextColor(i, textColorRead());
}
if (missing) {
/* Missing message */
pItem->setTextColor(i, Qt::darkRed);
pItem->setTextColor(i, textColorMissing());
}
pItem->setFont(i, qf);
}