1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(ui): format a few of css code

This commit is contained in:
Jakie.OYMJ 2018-08-10 13:19:34 +08:00
parent e22a22d0f4
commit 0efd142b00
8 changed files with 145 additions and 96 deletions

View File

@ -1,39 +1,42 @@
QLineEdit { QLineEdit
{
color: @black; color: @black;
background: white; background: white;
border: 0px; border: 0px;
} }
#nameLabel { #nameLabel
{
color: @black; color: @black;
font: @mediumBold; font: @mediumBold;
font-size:12px; font-size:12px;
} }
#statusLabel { #statusLabel
{
color: @mediumGrey; color: @mediumGrey;
font: @medium; font: @medium;
font-size:12px; font-size:12px;
} }
#peersLabel { #peersLabel
{
color: @mediumGrey; color: @mediumGrey;
font: @medium; font: @medium;
font-size:12px; font-size:12px;
} }
QLabel[peerType="our"] { QLabel[peerType="our"]
{
color: green; color: green;
} }
QLabel[peerType="muted"] { QLabel[peerType="muted"]
{
color: darkred; color: darkred;
} }
QLabel[playingAudio="true"] { QLabel[playingAudio="true"]
{
font-weight: bold; font-weight: bold;
} }
QMenu:disabled {
color: gray;
}

View File

@ -1,64 +1,80 @@
QScrollArea { QScrollArea
{
background: @themeMedium; background: @themeMedium;
} }
QScrollBar:vertical { QScrollBar:vertical
{
background: @themeMedium; background: @themeMedium;
width: 16px; width: 16px;
padding: 0px 3px 0px 3px; padding: 0px 3px 0px 3px;
} }
QScrollBar:handle:vertical { QScrollBar:handle:vertical
{
background: @themeDark; background: @themeDark;
min-height: 20px; min-height: 20px;
border-radius: 5px; border-radius: 5px;
margin: 3px 0px 3px 0px; margin: 3px 0px 3px 0px;
} }
QScrollBar:handle:vertical:hover { QScrollBar:handle:vertical:hover
{
background: @themeMediumDark; background: @themeMediumDark;
} }
QScrollBar:handle:vertical:pressed { QScrollBar:handle:vertical:pressed
{
background: @themeDark; background: @themeDark;
} }
QScrollBar:add-line:vertical {height: 0px;subcontrol-position: bottom;subcontrol-origin: margin;} QScrollBar:add-line:vertical
{
height: 0px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar:sub-line:vertical {height: 0px;subcontrol-position: top;subcontrol-origin: margin;} QScrollBar:sub-line:vertical
{
height: 0px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar:add-page:vertical, QScrollBar::sub-page:vertical { QScrollBar:add-page:vertical, QScrollBar::sub-page:vertical
{
background: none; background: none;
} }
QWidget#circleWidgetContainer > QFrame#line QWidget#circleWidgetContainer > QFrame#line
{ {
color: white; color: white;
} }
QWidget#circleWidgetContainer QWidget#circleWidgetContainer
{ {
background-color: @themeMedium; background-color: @themeMedium;
} }
QWidget#circleWidgetContainer:hover QWidget#circleWidgetContainer:hover
{ {
background-color: @themeLight; background-color: @themeLight;
} }
QWidget#circleWidgetContainer QLineEdit QWidget#circleWidgetContainer QLineEdit
{ {
background-color: @themeLight; background-color: @themeLight;
} }
QWidget#circleWidgetContainer > QLabel#status QWidget#circleWidgetContainer > QLabel#status
{ {
font: @small; font: @small;
color: @lightGrey; color: @lightGrey;
} }
QWidget#circleWidgetContainer > QLabel#name QWidget#circleWidgetContainer > QLabel#name
{ {
font: @big; font: @big;
color: @white; color: @white;
} }

View File

@ -1,58 +1,68 @@
#LoginScreen { #LoginScreen
background-color: #1c1c1c; {
background-color: #1c1c1c;
} }
#line { #line
color: #757575; {
color: #757575;
} }
#stackedWidget { #stackedWidget
background-color: #d6d2Cf; {
background-color: #d6d2Cf;
} }
#labelNewProfile, #labelNewProfile,
#labelLoadProfile { #labelLoadProfile
border-style: solid; {
border-width: 15px 0 15px 15px; border-style: solid;
border-color: #d6d2cf #d6d2cf #d6d2cf #1c1c1c; border-width: 15px 0 15px 15px;
border-color: #d6d2cf #d6d2cf #d6d2cf #1c1c1c;
} }
#labelNewProfile { #labelNewProfile
margin-top:125px; {
margin-bottom:45px; margin-top:125px;
margin-bottom:45px;
} }
#labelLoadProfile { #labelLoadProfile
margin-top:165px; {
margin-bottom:5px; margin-top:165px;
margin-bottom:5px;
} }
LoginScreen > QPushButton, LoginScreen > QPushButton,
QStackedWidget QPushButton QStackedWidget QPushButton
{ {
background: transparent; background: transparent;
border: none; border: none;
color: white; color: white;
font-size: 9pt; font-size: 9pt;
font-weight: bold; font-weight: bold;
} }
#loginButton, #loginButton,
#importButton, #importButton,
#createAccountButton { #createAccountButton
border-radius:5px; {
padding:5px; border-radius:5px;
background-color:#42a33a; padding:5px;
background-color:#42a33a;
} }
#loginButton:hover, #loginButton:hover,
#importButton:hover, #importButton:hover,
#createAccountButton:hover { #createAccountButton:hover
background: #0c530d; {
background: #0c530d;
} }
QLabel, QCheckBox, QProgressBar { QLabel, QCheckBox, QProgressBar
color: black; {
color: black;
} }
QCheckBox:disabled { QCheckBox:disabled
color: gray; {
color: gray;
} }

View File

@ -1,27 +1,33 @@
QTextEdit { QTextEdit
border-color: @lightGrey; {
border-style: solid; border-color: @lightGrey;
border-width: 1px 0 1px 1px; border-style: solid;
border-width: 1px 0 1px 1px;
background: white; background: white;
} }
QTextEdit:hover { QTextEdit:hover
border-color: #d7d4d1; {
border-color: #d7d4d1;
} }
QTextEdit:pressed { QTextEdit:pressed
border-color: #4ea6ea; {
border-color: #4ea6ea;
} }
QTextEdit#group { QTextEdit#group
/*border-radius: 0 6px 6px 0; would use to round corners in groupchat, but Qt's implementation seems to be bugged*/ {
border: 1px solid #c4c1bd; /*border-radius: 0 6px 6px 0; would use to round corners in groupchat, but Qt's implementation seems to be bugged*/
border: 1px solid #c4c1bd;
} }
QTextEdit#group:hover { QTextEdit#group:hover
border-color: #d7d4d1; {
border-color: #d7d4d1;
} }
QTextEdit#group:pressed { QTextEdit#group:pressed
border-color: #4ea6ea; {
border-color: #4ea6ea;
} }

View File

@ -10,21 +10,22 @@ QPushButton
QPushButton:default QPushButton:default
{ {
background-color: @themeMediumDark; background-color: @themeMediumDark;
} }
/*Bugged in Qt, but it's probably better to leave enabled so that users can tell it's clickable*/ /*Bugged in Qt, but it's probably better to leave enabled so that users can tell it's clickable*/
QPushButton:hover QPushButton:hover
{ {
background-color: @themeMedium; background-color: @themeMedium;
} }
QPushButton:pressed QPushButton:pressed
{ {
background-color: @themeMediumDark; background-color: @themeMediumDark;
} }
QPushButton:focus { QPushButton:focus
{
outline: none; outline: none;
} }
@ -32,9 +33,9 @@ QPushButton::menu-indicator {image: none;}
QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open
{ {
image: url(":ui/statusButton/menu_indicator.svg"); image: url(":ui/statusButton/menu_indicator.svg");
subcontrol-origin: padding; subcontrol-origin: padding;
subcontrol-position: bottom center; subcontrol-position: bottom center;
position: relative; position: relative;
bottom: 2px; bottom: 2px;
} }

View File

@ -1,4 +1,5 @@
#selfAvatar:hover { #selfAvatar:hover
{
border-radius: 6px; border-radius: 6px;
background-color: #ccc; background-color: #ccc;
} }

View File

@ -7,7 +7,8 @@ QLineEdit
border-radius: 4px; border-radius: 4px;
} }
QToolButton { QToolButton
{
background: none; background: none;
background-color: @themeMedium; background-color: @themeMedium;
color: white; color: white;
@ -15,17 +16,20 @@ QToolButton {
border-radius: 4px; border-radius: 4px;
} }
QToolButton:pressed { QToolButton:pressed
{
background-color: @themeMediumDark; background-color: @themeMediumDark;
border-radius: 4px; border-radius: 4px;
color: white; color: white;
} }
QToolButton::menu-indicator { QToolButton::menu-indicator
{
image: none image: none
} }
QPushButton#green { QPushButton#green
{
background: none; background: none;
background-color: #6bc260; background-color: #6bc260;
color: white; color: white;
@ -48,12 +52,14 @@ QPushButton#green:pressed
/** /**
Uncomment this after https://github.com/qTox/qTox/pull/1640 Uncomment this after https://github.com/qTox/qTox/pull/1640
is merged! is merged!
QComboBox:down-arrow { QComboBox:down-arrow
{
image: url(ui/css/down_arrow.png); image: url(ui/css/down_arrow.png);
} }
**/ **/
QListView { QListView
{
background-color: @themeLight; background-color: @themeLight;
border-style: none; border-style: none;
border-radius: 4px; border-radius: 4px;
@ -69,13 +75,15 @@ QListView {
background-color: @themeDark; background-color: @themeDark;
} }
#statusPanel > #statusHead > #nameLabel { #statusPanel > #statusHead > #nameLabel
{
background-color: @themeDark; background-color: @themeDark;
font: @extraBig; font: @extraBig;
color: @white; color: @white;
} }
#statusPanel > #statusHead > #statusLabel { #statusPanel > #statusHead > #statusLabel
{
background-color: @themeDark; background-color: @themeDark;
font: @medium; font: @medium;
color: @lightGrey; color: @lightGrey;
@ -102,7 +110,8 @@ QListView {
background-color: @themeMedium; background-color: @themeMedium;
} }
#statusPanel > #statusHead > #statusButton:focus { #statusPanel > #statusHead > #statusButton:focus
{
outline: none; outline: none;
} }
@ -116,4 +125,3 @@ QListView {
position: relative; position: relative;
bottom: 2px; bottom: 2px;
} }

View File

@ -35,7 +35,8 @@ QPushButton#minimizeButton
{ {
border: 0px solid transparent; border: 0px solid transparent;
background-color: transparent; background-color: transparent;
image: url(":ui/window/minimizeButton.png");} image: url(":ui/window/minimizeButton.png");
}
QPushButton#minimizeButton:hover {image: url(":ui/window/minimizeButtonHover.png");} QPushButton#minimizeButton:hover {image: url(":ui/window/minimizeButtonHover.png");}
QPushButton#minimizeButton:pressed {image: url(":ui/window/minimizeButtonPressed.png");} QPushButton#minimizeButton:pressed {image: url(":ui/window/minimizeButtonPressed.png");}
QPushButton#minimizeButton:focus {outline: none;} QPushButton#minimizeButton:focus {outline: none;}
@ -44,7 +45,8 @@ QPushButton#maximizeButton
{ {
border: 0px solid transparent; border: 0px solid transparent;
background-color: transparent; background-color: transparent;
image: url(":ui/window/maximizeButton.png");} image: url(":ui/window/maximizeButton.png");
}
QPushButton#maximizeButton:hover {image: url(":ui/window/maximizeButtonHover.png");} QPushButton#maximizeButton:hover {image: url(":ui/window/maximizeButtonHover.png");}
QPushButton#maximizeButton:pressed {image: url(":ui/window/maximizeButtonPressed.png");} QPushButton#maximizeButton:pressed {image: url(":ui/window/maximizeButtonPressed.png");}
QPushButton#maximizeButton:focus {outline: none;} QPushButton#maximizeButton:focus {outline: none;}
@ -53,7 +55,8 @@ QPushButton#closeButton
{ {
border: 0px solid transparent; border: 0px solid transparent;
background-color: transparent; background-color: transparent;
image: url(":ui/window/closeButton.png");} image: url(":ui/window/closeButton.png");
}
QPushButton#closeButton:hover {image: url(":ui/window/closeButtonHover.png");} QPushButton#closeButton:hover {image: url(":ui/window/closeButtonHover.png");}
QPushButton#closeButton:pressed {image: url(":ui/window/closeButtonPressed.png");} QPushButton#closeButton:pressed {image: url(":ui/window/closeButtonPressed.png");}
QPushButton#closeButton:focus {outline: none;} QPushButton#closeButton:focus {outline: none;}
@ -62,7 +65,8 @@ QPushButton#restoreButton
{ {
border: 0px solid transparent; border: 0px solid transparent;
background-color: transparent; background-color: transparent;
image: url(":ui/window/restoreButton.png");} image: url(":ui/window/restoreButton.png");
}
QPushButton#restoreButton:hover {image: url(":ui/window/restoreButtonHover.png");} QPushButton#restoreButton:hover {image: url(":ui/window/restoreButtonHover.png");}
QPushButton#restoreButton:pressed {image: url(":ui/window/restoreButtonPressed.png");} QPushButton#restoreButton:pressed {image: url(":ui/window/restoreButtonPressed.png");}
QPushButton#restoreButton:focus {outline: none;} QPushButton#restoreButton:focus {outline: none;}