diff --git a/retroshare-gui/src/gui/Posted/PostedItem.cpp b/retroshare-gui/src/gui/Posted/PostedItem.cpp index 327608ff8..7d70b3e15 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.cpp +++ b/retroshare-gui/src/gui/Posted/PostedItem.cpp @@ -32,9 +32,6 @@ #include -#define COLOR_NORMAL QColor(248, 248, 248) -#define COLOR_NEW QColor(220, 236, 253) - /** Constructor */ PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const RsGxsMessageId &messageId, bool isHome, bool autoUpdate) : @@ -427,16 +424,9 @@ void PostedItem::setReadStatus(bool isNew, bool isUnread) ui->newLabel->setVisible(isNew); - /* unpolish widget to clear the stylesheet's palette cache */ - ui->mainFrame->style()->unpolish(ui->mainFrame); - - QPalette palette = ui->mainFrame->palette(); - palette.setColor(ui->mainFrame->backgroundRole(), isNew ? COLOR_NEW : COLOR_NORMAL); // QScrollArea - palette.setColor(QPalette::Base, isNew ? COLOR_NEW : COLOR_NORMAL); // QTreeWidget - ui->mainFrame->setPalette(palette); - ui->mainFrame->setProperty("new", isNew); - Rshare::refreshStyleSheet(ui->mainFrame, false); + ui->mainFrame->style()->unpolish(ui->mainFrame); + ui->mainFrame->style()->polish( ui->mainFrame); } void PostedItem::readToggled(bool checked) diff --git a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp index 076006282..d154408b7 100644 --- a/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsChannelPostItem.cpp @@ -44,9 +44,6 @@ * #define DEBUG_ITEM 1 ****/ -#define COLOR_NORMAL QColor(248, 248, 248) -#define COLOR_NEW QColor(220, 236, 253) - GxsChannelPostItem::GxsChannelPostItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const RsGxsMessageId &messageId, bool isHome, bool autoUpdate,const std::set& older_versions) : GxsFeedItem(feedHolder, feedId, groupId, messageId, isHome, rsGxsChannels, autoUpdate) { @@ -69,9 +66,9 @@ void GxsChannelPostItem::init(const RsGxsMessageId& messageId,const std::setsubjectLabel->setMinimumWidth(100); ui->warning_label->setMinimumWidth(100); - ui->mainFrame->setProperty("state", ""); - QPalette palette = ui->mainFrame->palette(); - palette.setColor(ui->mainFrame->backgroundRole(), COLOR_NORMAL); - ui->mainFrame->setPalette(palette); + ui->mainFrame->setProperty("new", false); + ui->mainFrame->style()->unpolish(ui->mainFrame); + ui->mainFrame->style()->polish( ui->mainFrame); ui->expandFrame->hide(); } @@ -584,16 +580,9 @@ void GxsChannelPostItem::setReadStatus(bool isNew, bool isUnread) ui->newLabel->setVisible(isNew); - /* unpolish widget to clear the stylesheet's palette cache */ - ui->mainFrame->style()->unpolish(ui->mainFrame); - - QPalette palette = ui->mainFrame->palette(); - palette.setColor(ui->mainFrame->backgroundRole(), isNew ? COLOR_NEW : COLOR_NORMAL); // QScrollArea - palette.setColor(QPalette::Base, isNew ? COLOR_NEW : COLOR_NORMAL); // QTreeWidget - ui->mainFrame->setPalette(palette); - ui->mainFrame->setProperty("new", isNew); - Rshare::refreshStyleSheet(ui->mainFrame, false); + ui->mainFrame->style()->unpolish(ui->mainFrame); + ui->mainFrame->style()->polish( ui->mainFrame); } void GxsChannelPostItem::setFileCleanUpWarning(uint32_t time_left) diff --git a/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp b/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp index b37b72ef1..c130e1031 100644 --- a/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsCircleItem.cpp @@ -39,9 +39,6 @@ * #define DEBUG_ITEM 1 ****/ -#define COLOR_NORMAL QColor(248, 248, 248) -#define COLOR_NEW QColor(220, 236, 253) - #define CIRCLESDIALOG_GROUPUPDATE 3 diff --git a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp index 2f4ec243e..97ac9dd75 100644 --- a/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/GxsForumMsgItem.cpp @@ -39,9 +39,6 @@ * #define DEBUG_ITEM 1 ****/ -#define COLOR_NORMAL QColor(248, 248, 248) -#define COLOR_NEW QColor(220, 236, 253) - GxsForumMsgItem::GxsForumMsgItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const RsGxsMessageId &messageId, bool isHome, bool autoUpdate) : GxsFeedItem(feedHolder, feedId, groupId, messageId, isHome, rsGxsForums, autoUpdate) { @@ -415,16 +412,9 @@ void GxsForumMsgItem::toggle() void GxsForumMsgItem::setReadStatus(bool isNew, bool /*isUnread*/) { - /* unpolish widget to clear the stylesheet's palette cache */ - ui->frame->style()->unpolish(ui->frame); - - QPalette palette = ui->frame->palette(); - palette.setColor(ui->frame->backgroundRole(), isNew ? COLOR_NEW : COLOR_NORMAL); // QScrollArea - palette.setColor(QPalette::Base, isNew ? COLOR_NEW : COLOR_NORMAL); // QTreeWidget - ui->frame->setPalette(palette); - ui->frame->setProperty("new", isNew); - Rshare::refreshStyleSheet(ui->frame, false); + ui->frame->style()->unpolish(ui->frame); + ui->frame->style()->polish( ui->frame); } void GxsForumMsgItem::requestParentMessage(const RsGxsMessageId &msgId) diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp index 43f061079..c7b21df03 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp +++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp @@ -76,8 +76,6 @@ #define ROLE_CONTACT_ID Qt::UserRole #define ROLE_CONTACT_SORT Qt::UserRole + 1 -#define COLOR_CONNECT Qt::blue - #define COLUMN_RECIPIENT_TYPE 0 #define COLUMN_RECIPIENT_ICON 1 #define COLUMN_RECIPIENT_NAME 2 diff --git a/retroshare-gui/src/gui/qss/stylesheet/qss.default b/retroshare-gui/src/gui/qss/stylesheet/qss.default index e3c01bca1..8be8eb2e1 100644 --- a/retroshare-gui/src/gui/qss/stylesheet/qss.default +++ b/retroshare-gui/src/gui/qss/stylesheet/qss.default @@ -243,3 +243,10 @@ OpModeStatus[opMode="Gaming"] { OpModeStatus[opMode="Minimal"] { background: #FFCCCC; } + +[new=false] { + background: #F8F8F8; +} +[new=true] { + background: #DCECFD; +} diff --git a/retroshare-gui/src/qss/blacknight.qss b/retroshare-gui/src/qss/blacknight.qss index 4a454c54e..1b89a5f4c 100644 --- a/retroshare-gui/src/qss/blacknight.qss +++ b/retroshare-gui/src/qss/blacknight.qss @@ -3,7 +3,7 @@ HeaderFrame { border: 0px; } -ForumsDialog +ForumsDialog, GxsForumThreadWidget { qproperty-textColorRead: gray; qproperty-textColorUnread: white; @@ -292,3 +292,10 @@ OpModeStatus[opMode="Gaming"] { OpModeStatus[opMode="Minimal"] { background: #700000; } + +[new=false] { + background: #202020; +} +[new=true] { + background: #005000; +} diff --git a/retroshare-gui/src/qss/qdarkstyle.qss b/retroshare-gui/src/qss/qdarkstyle.qss index ad18bd402..224497a48 100644 --- a/retroshare-gui/src/qss/qdarkstyle.qss +++ b/retroshare-gui/src/qss/qdarkstyle.qss @@ -35,7 +35,7 @@ QProgressBar::chunk:horizontal { } QFrame#titleBarFrame, QFrame#toolBarFrame -{ +{ background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #616161, stop: 0.5 #505050, stop: 0.6 #434343, stop:1 #656565); @@ -74,6 +74,15 @@ QWidget:item:selected stop: 0 #78879b, stop: 1 #78879b); } +ForumsDialog, GxsForumThreadWidget +{ + qproperty-textColorRead: gray; + qproperty-textColorUnread: white; + qproperty-textColorUnreadChildren: gray; + qproperty-textColorNotSubscribed: white; + qproperty-textColorMissing: red; +} + QMenuBar { background-color: #302F2F; @@ -1079,3 +1088,10 @@ OpModeStatus[opMode="Gaming"] { OpModeStatus[opMode="Minimal"] { background: #700000; } + +[new=false] { + background: #202020; +} +[new=true] { + background: #005000; +}