[Qt] Swap color 'secondary' and 'accent' and add 'warning' color

This commit is contained in:
Satori 2020-09-08 23:38:16 +01:00
parent cca959e760
commit 16fd9cb36e
13 changed files with 65 additions and 64 deletions

View File

@ -20,7 +20,7 @@ QMenu::item {
}
QMenu::item:selected {
background-color: $secondaryDark;
background-color: $accentDark;
}
/* Global Scrollbar theming */
@ -45,13 +45,12 @@ QScrollBar::add-line:horizontal {
QScrollBar::sub-line:horizontal {
background: $dark2;
width: 20px;
width: 20px;
subcontrol-position: left;
subcontrol-origin: margin;
}
QScrollBar::add-page:horizontal,
QScrollBar::sub-page:horizontal {
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}
@ -87,17 +86,17 @@ QScrollBar::add-line:vertical {
QScrollBar::sub-line:vertical {
background: $dark2;
height: 20px;
height: 20px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::add-page:vertical,
QScrollBar::sub-page:vertical {
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: $dark2;
}
/* up and down are inversed here for some reason */
QScrollBar::up-arrow:vertical {
image: url(:/resources/graphics/down-arrow.png);
width: 8px;

View File

@ -2,14 +2,17 @@
for some reason QSS property values take priority over calling the setter of the property programatically
to work around this users can set the custom property to true before calling any setters
*/
QCheckBox#XCheckBox[custom="false"] {
qproperty-checked_color: $secondary;
qproperty-checked_color: $accent;
}
/*
these two properties cannot be changed programatically, to allow this move them into the above style
*/
QCheckBox#XCheckBox {
qproperty-border_color: $light2;
qproperty-focus_color: $secondary;
qproperty-focus_color: $accent;
subcontrol-position: left top;
}

View File

@ -5,11 +5,8 @@ QComboBox#XComboBox {
padding-left: 4px;
}
QComboBox#XComboBox:pressed,
QComboBox#XComboBox:hover,
QComboBox#XComboBox:focus,
QComboBox#XComboBox:on {
border: 2px solid $secondaryDark;
QComboBox#XComboBox:pressed, QComboBox#XComboBox:hover, QComboBox#XComboBox:focus, QComboBox#XComboBox:on {
border: 2px solid $accentDark;
}
QComboBox#XComboBox::drop-down {
@ -23,28 +20,25 @@ QComboBox#XComboBox::down-arrow {
height: 14px;
}
QComboBox#XComboBox::item
{
background: $dark2;
QComboBox#XComboBox::item {
background: $dark2;
}
QComboBox#XComboBox::item:selected
{
background: $secondaryDark;
QComboBox#XComboBox::item:selected {
background: $accentDark;
}
QComboBox#XComboBox::item:checked
{
font-weight: bold;
QComboBox#XComboBox::item:checked {
font-weight: bold;
}
QComboBox#XComboBox QAbstractItemView {
background: $dark2;
color: $light2;
selection-background-color: $secondaryDark;
selection-background-color: $accentDark;
outline: 0;
}
/* QComboBox#XComboBox QFrame:focus {
background: $secondaryDark;
} */
background: $accentDark;
} */

View File

@ -11,14 +11,13 @@ QToolButton#XDropdownButton:disabled {
border: none;
}
QToolButton#XDropdownButton:hover:!pressed,
QToolButton#XDropdownButton:focus {
border: 2px solid $secondaryDark;
QToolButton#XDropdownButton:hover:!pressed, QToolButton#XDropdownButton:focus {
border: 2px solid $accentDark;
outline: none;
}
QToolButton#XDropdownButton:pressed {
background: $secondaryDark;
background: $accentDark;
border: none;
}
@ -33,8 +32,7 @@ QToolButton#XDropdownButton::menu-button {
border: none;
}
QToolButton#XDropdownButton:disabled,
QToolButton#XDropdownButton::menu-button {
QToolButton#XDropdownButton:disabled, QToolButton#XDropdownButton::menu-button {
width: 15px;
margin: 2px;
background: $light3;
@ -42,10 +40,10 @@ QToolButton#XDropdownButton::menu-button {
}
QToolButton#XDropdownButton::menu-button:pressed {
background: $secondaryDark;
background: $accentDark;
}
QToolButton#XDropdownButton::menu-arrow:open {
top: -1px;
left: -1px;
}
}

View File

@ -1,8 +1,9 @@
QGroupBox {
background-color: $accent;
background-color: $secondary;
border: transparent;
border-radius: 2px;
margin: 20px 4px 4px 4px; /* leave space at the top for the title */
/* leave space at the top for the title */
margin: 20px 4px 4px 4px;
color: $primary;
font-family: "Segoe UI Semibold";
font-size: 14px;
@ -10,6 +11,7 @@ QGroupBox {
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top left; /* position at the top left */
/* position at the top left */
subcontrol-position: top left;
background: transparent;
}
}

View File

@ -5,7 +5,7 @@ QLineEdit#XLineEdit {
}
QLineEdit#XLineEdit:focus {
border: 2px solid $secondaryDark;
border: 2px solid $accentDark;
}
QLineEdit#XLineEdit:disabled {

View File

@ -1,5 +1,5 @@
QWidget#XNav {
background-color: $accent;
background-color: $secondary;
min-height: 60px;
max-height: 60px;
}
}

View File

@ -11,13 +11,12 @@ QPushButton#XPushButton:disabled {
border: none;
}
QPushButton#XPushButton:hover:!pressed,
QPushButton#XPushButton:focus {
border: 2px solid $secondaryDark;
QPushButton#XPushButton:hover:!pressed, QPushButton#XPushButton:focus {
border: 2px solid $accentDark;
outline: none;
}
QPushButton#XPushButton:pressed {
background: $secondaryDark;
background: $accentDark;
border: none;
}
}

View File

@ -2,14 +2,16 @@
for some reason QSS property values take priority over calling the setter of the property programatically
to work around this users can set the custom property to true before calling any setters
*/
QRadioButton#XRadioButton[custom="false"] {
qproperty-checked_color: $secondary;
qproperty-checked_color: $accent;
}
/*
these two properties cannot be changed programatically, to allow this move them into the above style
*/
QRadioButton#XRadioButton {
qproperty-border_color: $light2;
qproperty-focus_color: $secondary;
qproperty-focus_color: $accent;
}

View File

@ -4,7 +4,7 @@ QSlider#XSlider:horizontal {
}
QSlider#XSlider::groove:horizontal {
background: $secondaryDark;
background: $accentDark;
height: 4px;
margin: 0px 1px 0px 1px;
}
@ -12,7 +12,7 @@ QSlider#XSlider::groove:horizontal {
QSlider#XSlider::handle:horizontal {
width: 10px;
border-radius: 5px;
background: $secondary;
background: $accent;
margin: -3px -1px -3px -1px;
}
@ -21,12 +21,12 @@ QSlider#XSlider::handle:horizontal:focus {
height: 14px;
line-height: 14px;
border-radius: 7px;
background: $secondary;
background: $accent;
margin: -5px -1px -5px -1px;
}
QSlider#XSlider::groove:vertical {
background: $secondaryDark;
background: $accentDark;
width: 4px;
margin: 1px 0px 1px 0px;
}
@ -34,21 +34,21 @@ QSlider#XSlider::groove:vertical {
QSlider#XSlider::handle:vertical {
height: 10px;
border-radius: 5px;
background: $secondary;
background: $accent;
margin: -1px -3px -1px -3px;
}
QSlider#XSlider::handle:vertical:focus {
height: 14px;
border-radius: 7px;
background: $secondary;
background: $accent;
margin: -1px -5px -1px -5px;
}
/* Uncomment these to make slider color different before the handle to after */
QSlider#XSlider::sub-page:horizontal {
background: $secondaryDark;
background: $accentDark;
margin: 0px 1px 0px 1px;
}
@ -58,11 +58,11 @@ QSlider#XSlider::add-page:horizontal {
}
QSlider#XSlider::add-page:vertical {
background: $secondaryDark;
background: $accentDark;
margin: 1px 0px 1px 0px;
}
QSlider#XSlider::sub-page:vertical {
background: $light3;
margin: 1px 0px 1px 0px;
}
}

View File

@ -1,6 +1,6 @@
QWidget#XTabSelector {
qproperty-bar_color: $secondary;
qproperty-bar_color: $accent;
qproperty-font_color: $primary;
qproperty-font_size: 24;
qproperty-tab_spacing: 20;
}
}

View File

@ -5,7 +5,7 @@ QPlainTextEdit#XTextEdit {
}
QPlainTextEdit#XTextEdit:focus {
border: 2px solid $secondaryDark;
border: 2px solid $accentDark;
}
QPlainTextEdit#XTextEdit:disabled {

View File

@ -8,10 +8,14 @@
},
{
"name": "secondary",
"value": "#282828"
},
{
"name": "accent",
"value": "#5CE494"
},
{
"name": "secondaryDark",
"name": "accentDark",
"value": "#4AA971"
},
{
@ -23,8 +27,8 @@
"value": "#1F1F1F"
},
{
"name": "accent",
"value": "#282828"
"name": "warning",
"value": "#FFC864"
},
{
"name": "light1",
@ -51,4 +55,4 @@
"value": "#1E1E1E"
}
]
}
}