mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #1097 from PhenomRetroShare/Add_MoveFixedColorToQss
Move some Fixed Color to Qss files
This commit is contained in:
commit
8a4c1bddc5
@ -32,9 +32,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define COLOR_NORMAL QColor(248, 248, 248)
|
|
||||||
#define COLOR_NEW QColor(220, 236, 253)
|
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
|
|
||||||
PostedItem::PostedItem(FeedHolder *feedHolder, uint32_t feedId, const RsGxsGroupId &groupId, const RsGxsMessageId &messageId, bool isHome, bool autoUpdate) :
|
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);
|
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);
|
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)
|
void PostedItem::readToggled(bool checked)
|
||||||
|
@ -44,9 +44,6 @@
|
|||||||
* #define DEBUG_ITEM 1
|
* #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) :
|
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)
|
GxsFeedItem(feedHolder, feedId, groupId, messageId, isHome, rsGxsChannels, autoUpdate)
|
||||||
{
|
{
|
||||||
@ -212,10 +209,9 @@ void GxsChannelPostItem::setup()
|
|||||||
ui->subjectLabel->setMinimumWidth(100);
|
ui->subjectLabel->setMinimumWidth(100);
|
||||||
ui->warning_label->setMinimumWidth(100);
|
ui->warning_label->setMinimumWidth(100);
|
||||||
|
|
||||||
ui->mainFrame->setProperty("state", "");
|
ui->mainFrame->setProperty("new", false);
|
||||||
QPalette palette = ui->mainFrame->palette();
|
ui->mainFrame->style()->unpolish(ui->mainFrame);
|
||||||
palette.setColor(ui->mainFrame->backgroundRole(), COLOR_NORMAL);
|
ui->mainFrame->style()->polish( ui->mainFrame);
|
||||||
ui->mainFrame->setPalette(palette);
|
|
||||||
|
|
||||||
ui->expandFrame->hide();
|
ui->expandFrame->hide();
|
||||||
}
|
}
|
||||||
@ -584,16 +580,9 @@ void GxsChannelPostItem::setReadStatus(bool isNew, bool isUnread)
|
|||||||
|
|
||||||
ui->newLabel->setVisible(isNew);
|
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);
|
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)
|
void GxsChannelPostItem::setFileCleanUpWarning(uint32_t time_left)
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
* #define DEBUG_ITEM 1
|
* #define DEBUG_ITEM 1
|
||||||
****/
|
****/
|
||||||
|
|
||||||
#define COLOR_NORMAL QColor(248, 248, 248)
|
|
||||||
#define COLOR_NEW QColor(220, 236, 253)
|
|
||||||
|
|
||||||
#define CIRCLESDIALOG_GROUPUPDATE 3
|
#define CIRCLESDIALOG_GROUPUPDATE 3
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
* #define DEBUG_ITEM 1
|
* #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) :
|
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)
|
GxsFeedItem(feedHolder, feedId, groupId, messageId, isHome, rsGxsForums, autoUpdate)
|
||||||
{
|
{
|
||||||
@ -415,16 +412,9 @@ void GxsForumMsgItem::toggle()
|
|||||||
|
|
||||||
void GxsForumMsgItem::setReadStatus(bool isNew, bool /*isUnread*/)
|
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);
|
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)
|
void GxsForumMsgItem::requestParentMessage(const RsGxsMessageId &msgId)
|
||||||
|
@ -76,8 +76,6 @@
|
|||||||
#define ROLE_CONTACT_ID Qt::UserRole
|
#define ROLE_CONTACT_ID Qt::UserRole
|
||||||
#define ROLE_CONTACT_SORT Qt::UserRole + 1
|
#define ROLE_CONTACT_SORT Qt::UserRole + 1
|
||||||
|
|
||||||
#define COLOR_CONNECT Qt::blue
|
|
||||||
|
|
||||||
#define COLUMN_RECIPIENT_TYPE 0
|
#define COLUMN_RECIPIENT_TYPE 0
|
||||||
#define COLUMN_RECIPIENT_ICON 1
|
#define COLUMN_RECIPIENT_ICON 1
|
||||||
#define COLUMN_RECIPIENT_NAME 2
|
#define COLUMN_RECIPIENT_NAME 2
|
||||||
|
@ -243,3 +243,10 @@ OpModeStatus[opMode="Gaming"] {
|
|||||||
OpModeStatus[opMode="Minimal"] {
|
OpModeStatus[opMode="Minimal"] {
|
||||||
background: #FFCCCC;
|
background: #FFCCCC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[new=false] {
|
||||||
|
background: #F8F8F8;
|
||||||
|
}
|
||||||
|
[new=true] {
|
||||||
|
background: #DCECFD;
|
||||||
|
}
|
||||||
|
@ -3,7 +3,7 @@ HeaderFrame {
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ForumsDialog
|
ForumsDialog, GxsForumThreadWidget
|
||||||
{
|
{
|
||||||
qproperty-textColorRead: gray;
|
qproperty-textColorRead: gray;
|
||||||
qproperty-textColorUnread: white;
|
qproperty-textColorUnread: white;
|
||||||
@ -292,3 +292,10 @@ OpModeStatus[opMode="Gaming"] {
|
|||||||
OpModeStatus[opMode="Minimal"] {
|
OpModeStatus[opMode="Minimal"] {
|
||||||
background: #700000;
|
background: #700000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[new=false] {
|
||||||
|
background: #202020;
|
||||||
|
}
|
||||||
|
[new=true] {
|
||||||
|
background: #005000;
|
||||||
|
}
|
||||||
|
@ -74,6 +74,15 @@ QWidget:item:selected
|
|||||||
stop: 0 #78879b, stop: 1 #78879b);
|
stop: 0 #78879b, stop: 1 #78879b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ForumsDialog, GxsForumThreadWidget
|
||||||
|
{
|
||||||
|
qproperty-textColorRead: gray;
|
||||||
|
qproperty-textColorUnread: white;
|
||||||
|
qproperty-textColorUnreadChildren: gray;
|
||||||
|
qproperty-textColorNotSubscribed: white;
|
||||||
|
qproperty-textColorMissing: red;
|
||||||
|
}
|
||||||
|
|
||||||
QMenuBar
|
QMenuBar
|
||||||
{
|
{
|
||||||
background-color: #302F2F;
|
background-color: #302F2F;
|
||||||
@ -1079,3 +1088,10 @@ OpModeStatus[opMode="Gaming"] {
|
|||||||
OpModeStatus[opMode="Minimal"] {
|
OpModeStatus[opMode="Minimal"] {
|
||||||
background: #700000;
|
background: #700000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[new=false] {
|
||||||
|
background: #202020;
|
||||||
|
}
|
||||||
|
[new=true] {
|
||||||
|
background: #005000;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user