mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Move some Fixed Color to Qss files
This commit is contained in:
parent
37f6e7e13b
commit
f27d312885
@ -32,9 +32,6 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#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)
|
||||
|
@ -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<RsGxsMessageId>& older_versions) :
|
||||
GxsFeedItem(feedHolder, feedId, groupId, messageId, isHome, rsGxsChannels, autoUpdate)
|
||||
{
|
||||
@ -69,9 +66,9 @@ void GxsChannelPostItem::init(const RsGxsMessageId& messageId,const std::set<RsG
|
||||
v.push_back(*it) ;
|
||||
|
||||
if(older_versions.find(messageId) == older_versions.end())
|
||||
v.push_back(messageId);
|
||||
v.push_back(messageId);
|
||||
|
||||
setMessageVersions(v) ;
|
||||
setMessageVersions(v) ;
|
||||
|
||||
setup();
|
||||
|
||||
@ -212,10 +209,9 @@ void GxsChannelPostItem::setup()
|
||||
ui->subjectLabel->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)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -243,3 +243,10 @@ OpModeStatus[opMode="Gaming"] {
|
||||
OpModeStatus[opMode="Minimal"] {
|
||||
background: #FFCCCC;
|
||||
}
|
||||
|
||||
[new=false] {
|
||||
background: #F8F8F8;
|
||||
}
|
||||
[new=true] {
|
||||
background: #DCECFD;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user