mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Prepare for theme colors support
This commit is contained in:
parent
bf4ed63eac
commit
b0e6f1168c
|
@ -1053,16 +1053,7 @@ QSplitter:handle{
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton{
|
||||
background-color:#1c1c1c;
|
||||
border:none;
|
||||
}
|
||||
|
||||
QPushButton:hover{
|
||||
background-color:#292929;
|
||||
border:none;
|
||||
}
|
||||
</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
|
|
|
@ -71,6 +71,12 @@ QColor Style::getColor(Style::ColorPalette entry)
|
|||
QColor("#d1d1d1"),
|
||||
QColor("#ffffff"),
|
||||
QColor("#ff7700"),
|
||||
|
||||
// Theme colors
|
||||
QColor("#1c1c1c"),
|
||||
QColor("#2a2a2a"),
|
||||
QColor("#414141"),
|
||||
QColor("#4e4e4e"),
|
||||
};
|
||||
|
||||
return palette[entry];
|
||||
|
@ -110,6 +116,10 @@ QString Style::resolve(QString qss)
|
|||
{"@lightGrey", getColor(LightGrey).name()},
|
||||
{"@white", getColor(White).name()},
|
||||
{"@orange", getColor(Orange).name()},
|
||||
{"@themeDark", getColor(ThemeDark).name()},
|
||||
{"@themeMediumDark", getColor(ThemeMediumDark).name()},
|
||||
{"@themeMedium", getColor(ThemeMedium).name()},
|
||||
{"@themeLight", getColor(ThemeLight).name()},
|
||||
|
||||
// fonts
|
||||
{"@extraBig", qssifyFont(getFont(ExtraBig))},
|
||||
|
|
|
@ -38,6 +38,10 @@ public:
|
|||
LightGrey,
|
||||
White,
|
||||
Orange,
|
||||
ThemeDark,
|
||||
ThemeMediumDark,
|
||||
ThemeMedium,
|
||||
ThemeLight,
|
||||
};
|
||||
|
||||
enum Font
|
||||
|
|
|
@ -118,7 +118,7 @@ void Widget::init()
|
|||
ui->mainSplitter->restoreState(Settings::getInstance().getSplitterState());
|
||||
|
||||
layout()->setContentsMargins(0, 0, 0, 0);
|
||||
ui->friendList->setStyleSheet(Style::getStylesheet(":ui/friendList/friendList.css"));
|
||||
ui->friendList->setStyleSheet(Style::resolve(Style::getStylesheet(":ui/friendList/friendList.css")));
|
||||
|
||||
profilePicture = new MaskablePixmapWidget(this, QSize(40, 40), ":/img/avatar_mask.png");
|
||||
profilePicture->setPixmap(QPixmap(":/img/contact_dark.png"));
|
||||
|
@ -130,8 +130,9 @@ void Widget::init()
|
|||
ui->mainHead->setLayout(new QVBoxLayout());
|
||||
ui->mainHead->layout()->setMargin(0);
|
||||
ui->mainHead->layout()->setSpacing(0);
|
||||
|
||||
|
||||
ui->tooliconsZone->setStyleSheet(Style::resolve("QPushButton{background-color:@themeDark;border:none;}QPushButton:hover{background-color:@themeMediumDark;border:none;}"));
|
||||
|
||||
if(QStyleFactory::keys().contains(Settings::getInstance().getStyle())
|
||||
&& Settings::getInstance().getStyle() != "None")
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
GenericChatroomWidget
|
||||
{
|
||||
background-color: @mediumGrey;
|
||||
background-color: @themeMedium;
|
||||
}
|
||||
|
||||
GenericChatroomWidget[active="true"]
|
||||
|
@ -10,7 +10,7 @@ GenericChatroomWidget[active="true"]
|
|||
|
||||
GenericChatroomWidget[active="false"]:hover
|
||||
{
|
||||
background-color: @mediumGreyLight;
|
||||
background-color: @themeLight;
|
||||
}
|
||||
|
||||
GenericChatroomWidget[active="true"] > QLabel#status
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
QScrollArea {
|
||||
background: #414141;
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
background: rgb(65,65,65);
|
||||
background: @themeMedium;
|
||||
width: 16px;
|
||||
padding: 0px 3px 0px 3px;
|
||||
}
|
||||
|
||||
QScrollBar:handle:vertical {
|
||||
background: rgba(18, 18, 18, 204);
|
||||
background: @themeDark;
|
||||
min-height: 20px;
|
||||
border-radius: 5px;
|
||||
margin: 3px 0px 3px 0px;
|
||||
}
|
||||
|
||||
QScrollBar:handle:vertical:hover {
|
||||
background: rgba(35, 35, 35, 204);
|
||||
background: @themeMediumDark;
|
||||
}
|
||||
|
||||
QScrollBar:handle:vertical:pressed {
|
||||
background: rgba(13, 13, 13, 204);
|
||||
background: @themeDark;
|
||||
}
|
||||
|
||||
QScrollBar:add-line:vertical {height: 0px;subcontrol-position: bottom;subcontrol-origin: margin;}
|
||||
|
|
|
@ -9,7 +9,7 @@ QLineEdit
|
|||
|
||||
#statusPanel
|
||||
{
|
||||
background-color: @darkGrey;
|
||||
background-color: @themeDark;
|
||||
}
|
||||
|
||||
#statusPanel > #statusHead > #nameLabel {
|
||||
|
|
Loading…
Reference in New Issue
Block a user