Resources: Split stylesheets from base resources
Stylesheets: Each stylesheet specifies its own resources file Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
|
@ -3,6 +3,14 @@
|
|||
cwd="$(pwd)"
|
||||
cd "$(dirname "$0")"/../ || exit
|
||||
|
||||
pyrcc5 rare/resources/resources.qrc -o rare/resources/resources.py
|
||||
pyrcc5 -compress 6 \
|
||||
rare/resources/resources.qrc \
|
||||
-o rare/resources/resources.py
|
||||
pyrcc5 -compress 6 \
|
||||
rare/resources/stylesheets/RareStyle/stylesheet.qrc \
|
||||
-o rare/resources/stylesheets/RareStyle/__init__.py
|
||||
pyrcc5 -compress 6 \
|
||||
rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qrc \
|
||||
-o rare/resources/stylesheets/ChildOfMetropolis/__init__.py
|
||||
|
||||
cd "$cwd" || exit
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
import rare.resources.resources
|
||||
import rare.resources.stylesheets
|
|
@ -1,32 +1,17 @@
|
|||
<!DOCTYPE RCC>
|
||||
<RCC version="1.0">
|
||||
<qresource prefix="schemes">
|
||||
<file alias="Adapta-Nokto">colors/Adapta-Nokto.scheme</file>
|
||||
<file alias="Airy">colors/Airy.scheme</file>
|
||||
<file alias="Arc-Dark">colors/Arc-Dark.scheme</file>
|
||||
<file alias="Arc-Darker">colors/Arc-Darker.scheme</file>
|
||||
<file alias="Darker">colors/Darker.scheme</file>
|
||||
<file alias="Dusk">colors/Dusk.scheme</file>
|
||||
<file alias="Numix-Dark">colors/Numix-Dark.scheme</file>
|
||||
<file alias="Rare">colors/Rare.scheme</file>
|
||||
<file alias="Zukitre">colors/Zukitre.scheme</file>
|
||||
</qresource>
|
||||
<qresource prefix="stylesheets">
|
||||
<file alias="RareStyle">stylesheets/RareStyle/stylesheet.qss</file>
|
||||
</qresource>
|
||||
<qresource prefix="icons">
|
||||
<file alias="circle.svg">stylesheets/RareStyle/circle.svg</file>
|
||||
<file alias="circle-disabled.svg">stylesheets/RareStyle/circle-disabled.svg</file>
|
||||
<file alias="drop-down.svg">stylesheets/RareStyle/drop-down.svg</file>
|
||||
<file alias="half-square.svg">stylesheets/RareStyle/half-square.svg</file>
|
||||
<file alias="half-square-disabled.svg">stylesheets/RareStyle/half-square-disabled.svg</file>
|
||||
<file alias="sort-down.svg">stylesheets/RareStyle/sort-down.svg</file>
|
||||
<file alias="sort-up.svg">stylesheets/RareStyle/sort-up.svg</file>
|
||||
<file alias="square.svg">stylesheets/RareStyle/square.svg</file>
|
||||
<file alias="square-disabled.svg">stylesheets/RareStyle/square-disabled.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="images">
|
||||
<file alias="Rare.png">images/Rare.png</file>
|
||||
<file alias="loader.gif">images/loader.gif</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
<RCC>
|
||||
<qresource prefix="schemes">
|
||||
<file alias="Adapta-Nokto">colors/Adapta-Nokto.scheme</file>
|
||||
<file alias="Airy">colors/Airy.scheme</file>
|
||||
<file alias="Arc-Dark">colors/Arc-Dark.scheme</file>
|
||||
<file alias="Arc-Darker">colors/Arc-Darker.scheme</file>
|
||||
<file alias="Darker">colors/Darker.scheme</file>
|
||||
<file alias="Dusk">colors/Dusk.scheme</file>
|
||||
<file alias="Numix-Dark">colors/Numix-Dark.scheme</file>
|
||||
<file alias="Rare">colors/Rare.scheme</file>
|
||||
<file alias="Zukitre">colors/Zukitre.scheme</file>
|
||||
</qresource>
|
||||
<qresource prefix="images">
|
||||
<file alias="Rare.png">images/Rare.png</file>
|
||||
<file alias="loader.gif">images/loader.gif</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
rare/resources/stylesheets/ChildOfMetropolis/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg height="736" viewBox="0 0 736 736" width="736" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m368 120c-137 0-248 111-248 248s111 248 248 248 248-111 248-248-111-248-248-248z" fill="#A8AAAB"/>
|
||||
</svg>
|
After Width: | Height: | Size: 206 B |
3
rare/resources/stylesheets/ChildOfMetropolis/circle.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg height="736" viewBox="0 0 736 736" width="736" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m368 120c-137 0-248 111-248 248s111 248 248 248 248-111 248-248-111-248-248-248z" fill="#FFAACE"/>
|
||||
</svg>
|
After Width: | Height: | Size: 206 B |
|
@ -0,0 +1,4 @@
|
|||
<svg height="640" viewBox="0 0 320 640" width="320" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m41 236.475h238c21.4 0 32.1 25.9 17 41l-119 119c-9.4 9.4-24.6 9.4-33.9 0l-119.1-119c-15.1-15.1-4.4-41 17-41z"
|
||||
fill="#E7BD54"/>
|
||||
</svg>
|
After Width: | Height: | Size: 244 B |
|
@ -0,0 +1,4 @@
|
|||
<svg height="688" viewBox="0 0 688 688" width="688" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m520 120h-352c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48l400-400c0-26.5-21.5-48-48-48z"
|
||||
fill="#A8AAAB"/>
|
||||
</svg>
|
After Width: | Height: | Size: 226 B |
|
@ -0,0 +1,4 @@
|
|||
<svg height="688" viewBox="0 0 688 688" width="688" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m520 120h-352c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48l400-400c0-26.5-21.5-48-48-48z"
|
||||
fill="#FFAACE"/>
|
||||
</svg>
|
After Width: | Height: | Size: 226 B |
|
@ -0,0 +1,4 @@
|
|||
<svg height="320" viewBox="0 0 320 320" width="320" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m41 76.475h238c21.4 0 32.1 25.9 17 41l-119 119c-9.4 9.4-24.6 9.4-33.9 0l-119.1-119c-15.1-15.1-4.4-41 17-41z"
|
||||
fill="#E7BD54"/>
|
||||
</svg>
|
After Width: | Height: | Size: 243 B |
4
rare/resources/stylesheets/ChildOfMetropolis/sort-up.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg height="320" viewBox="0 0 320 320" width="320" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m279.01546 243.525h-237.999997c-21.4 0-32.1000001-25.9-17-41l118.999997-119c9.4-9.4 24.6-9.4 33.9 0l119 119c15.2 15.1 4.5 41-16.9 41z"
|
||||
fill="#E7BD54"/>
|
||||
</svg>
|
After Width: | Height: | Size: 269 B |
|
@ -0,0 +1,4 @@
|
|||
<svg height="688" viewBox="0 0 688 688" width="688" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m520 120h-352c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-352c0-26.5-21.5-48-48-48z"
|
||||
fill="#A8AAAB"/>
|
||||
</svg>
|
After Width: | Height: | Size: 248 B |
4
rare/resources/stylesheets/ChildOfMetropolis/square.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg height="688" viewBox="0 0 688 688" width="688" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m520 120h-352c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-352c0-26.5-21.5-48-48-48z"
|
||||
fill="#FFAACE"/>
|
||||
</svg>
|
After Width: | Height: | Size: 248 B |
14
rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qrc
Normal file
|
@ -0,0 +1,14 @@
|
|||
<RCC>
|
||||
<qresource prefix="stylesheets/ChildOfMetropolis">
|
||||
<file>circle-disabled.svg</file>
|
||||
<file>circle.svg</file>
|
||||
<file>drop-down.svg</file>
|
||||
<file>half-square-disabled.svg</file>
|
||||
<file>half-square.svg</file>
|
||||
<file>sort-down.svg</file>
|
||||
<file>sort-up.svg</file>
|
||||
<file>square-disabled.svg</file>
|
||||
<file>square.svg</file>
|
||||
<file>stylesheet.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
791
rare/resources/stylesheets/ChildOfMetropolis/stylesheet.qss
Normal file
|
@ -0,0 +1,791 @@
|
|||
/*
|
||||
[Text]
|
||||
normal: #eeeeee #36393F -- main font color
|
||||
disabled: #43474d #767778 -- disabled font color
|
||||
rgba( 67, 71, 77, 55%) == #DADDDE
|
||||
rgba( 67, 71, 77, 25%) == #A8AAAB
|
||||
[Background]
|
||||
normal: #202225 #C2C4C5 -- main background color
|
||||
editable: #333344 #DADDDE -- background color for reactive/editable widgets (TextEdits, ProgressBars etc)
|
||||
hover: #222233 #B2D3DE -- background color when hovering over reactive widgets (Buttons, Headers)
|
||||
selection: #2f4f4f #71DA7E -- background color for selectable widgets
|
||||
alternate: #282a2e #BCBEBF -- background color for alternating rows in List/Tree/TableViews and for ScrollBars
|
||||
|
||||
[Border]
|
||||
normal: #483d8b #5CD3FF -- border color for most widgets
|
||||
rgba( 72, 61, 139, 25%) == #B2D3DE
|
||||
editable: #2f4f4f #71DA7E -- border color for editable widgets (TextEdits, ProgressBars etc)
|
||||
highlight: #5246a0 #5CD3FF -- border color for dropdown widgets, a bit lighter than border for more separation
|
||||
disabled: #43474d #767778 -- border for disabled widgets
|
||||
alternate: #3c3f41 #A3DAAA -- border color for gradient backgrounds on widgets like Tabs and Popups
|
||||
|
||||
[Special]
|
||||
info-normal: #bbb #4D5059 -- infoLabel
|
||||
install-normal: #070 #F9A7FF -- install
|
||||
install-hover: #050 #BB7DBF -- install
|
||||
install-disabled: #020 #7D5380 -- install
|
||||
uninstall-normal: #700 #FFB085 -- uninstall
|
||||
uninstall-hover: #500 #BF8464 -- uninstall
|
||||
uninstall-disabled: #200 #805843 -- uninstall
|
||||
*/
|
||||
|
||||
* {
|
||||
color: #36393F;
|
||||
border-color: #5CD3FF;
|
||||
background-color: #C2C4C5;
|
||||
}
|
||||
*:disabled,
|
||||
*:editable:disabled {
|
||||
color: #767778;
|
||||
border-color: #767778;
|
||||
background-color: #C2C4C5;
|
||||
}
|
||||
|
||||
QLabel,
|
||||
QLabel:disabled {
|
||||
border-width: 0px;
|
||||
background-color: transparent;
|
||||
padding: 0px;
|
||||
selection-background-color: #71DA7E;
|
||||
}
|
||||
QLabel[infoLabel="1"] {
|
||||
color: #4D5059;
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
QMenu,
|
||||
QListView,
|
||||
QListView::item,
|
||||
QTreeView,
|
||||
QTreeView::item,
|
||||
QTableView,
|
||||
QTableView::item,
|
||||
QHeaderView::section,
|
||||
QTableView QTableCornerButton::section,
|
||||
QFrame[frameShape="6"],
|
||||
QLineEdit,
|
||||
QTextEdit,
|
||||
QTimeEdit,
|
||||
QDateEdit,
|
||||
QDateTimeEdit,
|
||||
QToolBox,
|
||||
QComboBox,
|
||||
QComboBox:editable,
|
||||
QComboBox QAbstractItemView,
|
||||
QSpinBox,
|
||||
QDoubleSpinBox,
|
||||
QProgressBar,
|
||||
QScrollBar {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
QHeaderView::section,
|
||||
QTableView QTableCornerButton::section,
|
||||
QLineEdit,
|
||||
QTextEdit,
|
||||
QTimeEdit,
|
||||
QDateEdit,
|
||||
QDateTimeEdit,
|
||||
QComboBox:editable,
|
||||
QComboBox QAbstractItemView,
|
||||
QSpinBox,
|
||||
QDoubleSpinBox,
|
||||
QProgressBar,
|
||||
QScrollBar {
|
||||
border-color: #71DA7E;
|
||||
background-color: #DADDDE;
|
||||
selection-background-color: #71DA7E;
|
||||
}
|
||||
QLineEdit,
|
||||
QTextEdit,
|
||||
QTimeEdit,
|
||||
QDateEdit,
|
||||
QDateTimeEdit,
|
||||
QComboBox,
|
||||
QSpinBox,
|
||||
QDoubleSpinBox,
|
||||
QProgressBar,
|
||||
QPushButton {
|
||||
height: 1.30em;
|
||||
}
|
||||
QToolButton {
|
||||
height: 1.10em;
|
||||
}
|
||||
QFrame[frameShape="6"] {
|
||||
border-radius: 4px;
|
||||
}
|
||||
QFrame[noBorder="1"],
|
||||
QListView[noBorder="1"],
|
||||
QScrollArea[noBorder="1"],
|
||||
QStackedWidget[noBorder="1"] {
|
||||
border-color: transparent;
|
||||
}
|
||||
QComboBox {
|
||||
background-color: #DADDDE;
|
||||
}
|
||||
QComboBox:disabled {
|
||||
background-color: #A8AAAB;
|
||||
}
|
||||
QComboBox:!editable:hover {
|
||||
background-color: #B2D3DE;
|
||||
}
|
||||
*::item:selected,
|
||||
QComboBox QAbstractItemView {
|
||||
selection-background-color: #71DA7E;
|
||||
}
|
||||
*::drop-down,
|
||||
*::drop-down:editable,
|
||||
*::up-button,
|
||||
*::down-button {
|
||||
subcontrol-origin: border;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 2px;
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
*::drop-down:disabled,
|
||||
*::drop-down:editable:disabled,
|
||||
*::up-button:disabled,
|
||||
*::down-button:disabled {
|
||||
border-color: #767778;
|
||||
background-color: transparent;
|
||||
}
|
||||
*::drop-down {
|
||||
subcontrol-position: top right;
|
||||
border-color: #5CD3FF;
|
||||
border-left-color: #5CD3FF; /* #5CD3FF lighter */
|
||||
}
|
||||
*::drop-down:editable,
|
||||
*::up-button,
|
||||
*::down-button {
|
||||
border-color: #71DA7E;
|
||||
background-color: #A3DAAA;
|
||||
}
|
||||
*::drop-down,
|
||||
*::drop-down:editable {
|
||||
width: 14px;
|
||||
image: url(":/stylesheets/ChildOfMetropolis/drop-down.svg");
|
||||
}
|
||||
*::up-button,
|
||||
*::down-button {
|
||||
width: 14px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
|
||||
}
|
||||
*::up-button {
|
||||
subcontrol-position: top right; /* position at the top right corner */
|
||||
border-bottom-width: 1;
|
||||
image: url(":/stylesheets/ChildOfMetropolis/sort-up.svg");
|
||||
}
|
||||
*::down-button {
|
||||
subcontrol-position: bottom right; /* position at bottom right corner */
|
||||
border-top-width: 1;
|
||||
image: url(":/stylesheets/ChildOfMetropolis/sort-down.svg");
|
||||
}
|
||||
QProgressBar {
|
||||
text-align: center;
|
||||
}
|
||||
QProgressBar::chunk {
|
||||
width: 2%;
|
||||
margin: 0%;
|
||||
background-color: #71DA7E;
|
||||
}
|
||||
QScrollBar {
|
||||
border-radius: 4px;
|
||||
padding: 1px;
|
||||
background-color: #BCBEBF;
|
||||
}
|
||||
QScrollBar:vertical {
|
||||
width: 11px;
|
||||
}
|
||||
QScrollBar:horizontal {
|
||||
height: 11px;
|
||||
}
|
||||
QScrollBar::add-line:vertical,
|
||||
QScrollBar::sub-line:vertical,
|
||||
QScrollBar::add-line:horizontal,
|
||||
QScrollBar::sub-line:horizontal {
|
||||
border: none;
|
||||
height: 0px;
|
||||
background: transparent;
|
||||
}
|
||||
QScrollBar::add-line:vertical {
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
QScrollBar::sub-line:vertical {
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
QScrollBar::add-line:horizontal {
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
QScrollBar::sub-line:horizontal {
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
QScrollBar::handle {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #5CD3FF;
|
||||
background-color: #DADDDE;
|
||||
border-radius: 2px;
|
||||
min-height: 30px;
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
QHeaderView {
|
||||
padding: 0px;
|
||||
}
|
||||
QHeaderView::section:horizontal {
|
||||
padding: 0px;
|
||||
margin-left: 0px;
|
||||
margin-right: 1px;
|
||||
}
|
||||
QHeaderView::section:vertical {
|
||||
padding: 0px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
QHeaderView::section:horizontal:first {
|
||||
margin-left: 1px;
|
||||
}
|
||||
QHeaderView::section:vertical:first {
|
||||
margin-top: 1px;
|
||||
}
|
||||
QListView,
|
||||
QTreeView,
|
||||
QTableView {
|
||||
outline: 0;
|
||||
gridline-color: #BCBEBF;
|
||||
show-decoration-selected: 0;
|
||||
selection-background-color: transparent;
|
||||
background-color: #C2C4C5;
|
||||
alternate-background-color: #BCBEBF;
|
||||
}
|
||||
|
||||
QListView::item,
|
||||
QTreeView::item {
|
||||
margin-right: 1px;
|
||||
}
|
||||
/* The first element is attaching to the QHeaderView */
|
||||
/*
|
||||
QTableView[currentColumn="0"]::item {
|
||||
margin-left: 1px;
|
||||
}
|
||||
QTableView[currentRow="0"]::item {
|
||||
margin-top: 1px;
|
||||
}
|
||||
*/
|
||||
QListView::item:hover,
|
||||
QTreeView::item:hover,
|
||||
QTableView::item:hover {
|
||||
border-color: #5CD3FF;
|
||||
background-color: #B2D3DE;
|
||||
}
|
||||
QListView::item:selected,
|
||||
QTreeView::item:selected,
|
||||
QTableView::item:selected {
|
||||
border-color: #5CD3FF;
|
||||
background-color: #71DA7E;
|
||||
}
|
||||
|
||||
QPushButton,
|
||||
QToolButton {
|
||||
background-color: #DADDDE;
|
||||
}
|
||||
QPushButton:disabled,
|
||||
QToolButton:disabled {
|
||||
background-color: #A8AAAB;
|
||||
}
|
||||
QPushButton:hover,
|
||||
QToolButton:hover,
|
||||
QHeaderView::section:hover {
|
||||
background-color: #B2D3DE;
|
||||
}
|
||||
QPushButton,
|
||||
QToolButton {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
QPushButton::menu-indicator {
|
||||
subcontrol-position: right center;
|
||||
subcontrol-origin: padding;
|
||||
left: -2px;
|
||||
border-style: none;
|
||||
}
|
||||
QPushButton#menu {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
border-style: none;
|
||||
}
|
||||
QPushButton#menu_button {
|
||||
border-width: 0px;
|
||||
background-color: #A3DAAA;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
QPushButton#menu_button:hover {
|
||||
background-color: #DADDDE;
|
||||
}
|
||||
QPushButton[install="1"],
|
||||
QPushButton#install_button {
|
||||
background-color: #F9A7FF;
|
||||
}
|
||||
QPushButton[install="1"]:hover,
|
||||
QPushButton#install_button:hover {
|
||||
background-color: #BB7DBF;
|
||||
}
|
||||
QPushButton[install="1"]:disabled,
|
||||
QPushButton#install_button:disabled {
|
||||
background-color: #7D5380;
|
||||
}
|
||||
QPushButton[uninstall="1"],
|
||||
QPushButton#uninstall_button {
|
||||
background-color: #FFB085;
|
||||
}
|
||||
QPushButton[uninstall="1"]:hover,
|
||||
QPushButton#uninstall_button:hover {
|
||||
background-color: #BF8464;
|
||||
}
|
||||
QPushButton[uninstall="1"]:disabled,
|
||||
QPushButton#uninstall_button:disabled {
|
||||
background-color: #805843;
|
||||
}
|
||||
QPushButton#success{
|
||||
background-color: lime;
|
||||
}
|
||||
QPushButton#installed_menu_button:hover {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
QGroupBox,
|
||||
QCheckBox,
|
||||
QRadioButton {
|
||||
background-color: transparent;
|
||||
}
|
||||
QGroupBox::indicator,
|
||||
QCheckBox::indicator,
|
||||
QRadioButton::indicator,
|
||||
QListView::indicator,
|
||||
QTreeView::indicator,
|
||||
QTableView::indicator {
|
||||
border-color: #71DA7E;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
background-color: #C2C4C5;
|
||||
}
|
||||
QCheckBox::indicator,
|
||||
QRadioButton::indicator,
|
||||
QListView::indicator,
|
||||
QTreeView::indicator,
|
||||
QTableView::indicator {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
QGroupBox::indicator:disabled,
|
||||
QCheckBox::indicator:disabled,
|
||||
QRadioButton::indicator:disabled,
|
||||
QListView::indicator:disabled,
|
||||
QTreeView::indicator:disabled,
|
||||
QTableView::indicator:disabled {
|
||||
border-color: #767778;
|
||||
}
|
||||
QRadioButton::indicator {
|
||||
border-radius: 5%;
|
||||
}
|
||||
QGroupBox::indicator,
|
||||
QCheckBox::indicator,
|
||||
QListView::indicator,
|
||||
QTreeView::indicator,
|
||||
QTableView::indicator {
|
||||
border-radius: 2px;
|
||||
}
|
||||
QGroupBox::indicator:checked,
|
||||
QCheckBox::indicator:checked,
|
||||
QListView::indicator:checked,
|
||||
QTreeView::indicator:checked,
|
||||
QTableView::indicator:checked {
|
||||
border-radius: 2px;
|
||||
image: url(":/stylesheets/ChildOfMetropolis/square.svg");
|
||||
}
|
||||
QGroupBox::indicator:indeterminate,
|
||||
QCheckBox::indicator:indeterminate,
|
||||
QListView::indicator:indeterminate,
|
||||
QTreeView::indicator:indeterminate,
|
||||
QTableView::indicator:indeterminate {
|
||||
border-radius: 2px;
|
||||
image: url(":/stylesheets/ChildOfMetropolis/half-square.svg");
|
||||
}
|
||||
QRadioButton::indicator:checked {
|
||||
border-radius: 5%;
|
||||
image: url(":/stylesheets/ChildOfMetropolis/circle.svg");
|
||||
}
|
||||
QGroupBox::indicator:checked:disabled,
|
||||
QCheckBox::indicator:checked:disabled,
|
||||
QListView::indicator:checked:disabled,
|
||||
QTreeView::indicator:checked:disabled,
|
||||
QTableView::indicator:checked:disabled {
|
||||
image: url(":/stylesheets/ChildOfMetropolis/square-disabled.svg");
|
||||
}
|
||||
QGroupBox::indicator:indeterminate:disabled,
|
||||
QCheckBox::indicator:indeterminate:disabled,
|
||||
QListView::indicator:indeterminate:disabled,
|
||||
QTreeView::indicator:indeterminate:disabled,
|
||||
QTableView::indicator:indeterminate:disabled {
|
||||
image: url(":/stylesheets/ChildOfMetropolis/half-square-disabled.svg");
|
||||
}
|
||||
QRadioButton::indicator:checked:disabled {
|
||||
image: url(":/stylesheets/ChildOfMetropolis/circle-disabled.svg");
|
||||
}
|
||||
|
||||
QGroupBox,
|
||||
QGroupBox#group,
|
||||
QGroupBox#settings_widget {
|
||||
font-weight: bold;
|
||||
margin-top: 0.5em;
|
||||
/* margin-left: 0.5em; /* Offset to the left */
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 4px;
|
||||
padding-top: 1.2em;
|
||||
}
|
||||
QGroupBox#game_widget_icon {
|
||||
margin: 2px;
|
||||
border-width: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
QToolBox::tab,
|
||||
QGroupBox::title {
|
||||
subcontrol-origin: border;
|
||||
subcontrol-position: top left; /* position at the top left */
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-color: #5CD3FF;
|
||||
padding: 1px;
|
||||
/*
|
||||
background: qlineargradient(
|
||||
x1: -2, y1: 0,
|
||||
x2: 1, y2: 1,
|
||||
stop: 0 #5CD3FF,
|
||||
stop: 1 #C2C4C5);
|
||||
*/
|
||||
background-color: #B2D3DE;
|
||||
}
|
||||
QGroupBox::title:disabled {
|
||||
border-color: #767778;
|
||||
background-color: #A8AAAB;
|
||||
}
|
||||
|
||||
QSizeGrip {
|
||||
image: none;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
#list_widget {
|
||||
border-top-width: 2px;
|
||||
}
|
||||
|
||||
#search_bar {
|
||||
padding: 3px;
|
||||
border-radius: 5px;
|
||||
background-color: #DADDDE;
|
||||
}
|
||||
|
||||
QTabWidget::pane {
|
||||
}
|
||||
QTabWidget::tab-bar {
|
||||
}
|
||||
QTabBar {
|
||||
qproperty-drawBase: 0;
|
||||
}
|
||||
QTabBar::tab {
|
||||
margin: 0px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
padding: 4px;
|
||||
}
|
||||
QTabBar::tab:top,
|
||||
QTabBar::tab:bottom {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
QTabBar::tab:top:hover,
|
||||
QTabBar::tab:bottom:hover {
|
||||
border-color: #5CD3FF;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
QTabBar::tab:top {
|
||||
border-top-width: 3px;
|
||||
border-top-color: #A3DAAA;
|
||||
border-bottom-color: #5CD3FF;
|
||||
background: qlineargradient(
|
||||
x1: 0, y1: -1,
|
||||
x2: 0, y2: 1,
|
||||
stop: 0 #A3DAAA,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:bottom {
|
||||
border-bottom-width: 3px;
|
||||
border-top-color: #5CD3FF;
|
||||
border-bottom-color: #A3DAAA;
|
||||
background: qlineargradient(
|
||||
x1: 0, y1: 2,
|
||||
x2: 0, y2: 0,
|
||||
stop: 0 #A3DAAA,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:top:hover {
|
||||
background: qlineargradient(
|
||||
x1: 0, y1: -1,
|
||||
x2: 0, y2: 1,
|
||||
stop: 0 #5CD3FF,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:bottom:hover {
|
||||
background: qlineargradient(
|
||||
x1: 0, y1: 2,
|
||||
x2: 0, y2: 0,
|
||||
stop: 0 #5CD3FF,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:top:selected {
|
||||
border-color: #5CD3FF;
|
||||
border-bottom-color: transparent;
|
||||
background: #C2C4C5;
|
||||
}
|
||||
QTabBar::tab:bottom:selected {
|
||||
border-color: #5CD3FF;
|
||||
border-top-color: transparent;
|
||||
background: #C2C4C5;
|
||||
}
|
||||
QTabBar::tab:top:disabled {
|
||||
border-bottom-color: #A3DAAA;
|
||||
}
|
||||
QTabBar::tab:bottom:disabled {
|
||||
border-top-color: #A3DAAA;
|
||||
}
|
||||
QTabBar::tab:top:selected:disabled {
|
||||
border-color: #A3DAAA;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
QTabBar::tab:bottom:selected:disabled {
|
||||
border-color: #A3DAAA;
|
||||
border-top-color: transparent;
|
||||
}
|
||||
QTabBar::tab:left,
|
||||
QTabBar::tab:right {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
QTabBar::tab:left:hover,
|
||||
QTabBar::tab:right:hover {
|
||||
border-color: #5CD3FF;
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
QTabBar::tab:left {
|
||||
border-left-width: 3px;
|
||||
border-left-color: #A3DAAA;
|
||||
border-right-color: #5CD3FF;
|
||||
background: qlineargradient(
|
||||
x1: -1, y1: 0,
|
||||
x2: 1, y2: 0,
|
||||
stop: 0 #A3DAAA,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:right {
|
||||
border-right-width: 3px;
|
||||
border-right-color: #A3DAAA;
|
||||
border-left-color: #5CD3FF;
|
||||
background: qlineargradient(
|
||||
x1: 2, y1: 0,
|
||||
x2: 0, y2: 0,
|
||||
stop: 0 #A3DAAA,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:left:hover {
|
||||
background: qlineargradient(
|
||||
x1: -1, y1: 0,
|
||||
x2: 1, y2: 0,
|
||||
stop: 0 #5CD3FF,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:right:hover {
|
||||
background: qlineargradient(
|
||||
x1: 2, y1: 0,
|
||||
x2: 0, y2: 0,
|
||||
stop: 0 #5CD3FF,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
QTabBar::tab:left:selected {
|
||||
border-color: #5CD3FF;
|
||||
border-right-color: transparent;
|
||||
background: #C2C4C5;
|
||||
}
|
||||
QTabBar::tab:right:selected {
|
||||
border-color: #5CD3FF;
|
||||
border-left-color: transparent;
|
||||
background: #C2C4C5;
|
||||
}
|
||||
QTabBar::tab:left:disabled {
|
||||
border-right-color: #A3DAAA;
|
||||
}
|
||||
QTabBar::tab:right:disabled {
|
||||
border-left-color: #A3DAAA;
|
||||
}
|
||||
QTabBar::tab:left:selected:disabled {
|
||||
border-color: #A3DAAA;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
QTabBar::tab:right:selected:disabled {
|
||||
border-color: #A3DAAA;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
QTabBar#MainTabBar {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
border-bottom-color: #5CD3FF;
|
||||
/*
|
||||
background: qlineargradient(
|
||||
x1: 0, y1: -3,
|
||||
x2: 0, y2: 1,
|
||||
stop: 0 #A3DAAA,
|
||||
stop: 1 #C2C4C5);
|
||||
*/
|
||||
}
|
||||
QTabBar#MainTabBar:disabled {
|
||||
border-color: transparent;
|
||||
border-bottom-color: #A3DAAA;
|
||||
}
|
||||
QTabBar#MainTabBar::tab {
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: #5CD3FF;
|
||||
padding: 5px;
|
||||
}/*
|
||||
QTabBar#MainTabBar::tab:top:first,
|
||||
QTabBar#MainTabBar::tab:bottom:first {
|
||||
margin-left: 0px;
|
||||
border-left: transparent;
|
||||
}
|
||||
QTabBar#MainTabBar::tab:top:last,
|
||||
QTabBar#MainTabBar::tab:bottom:last {
|
||||
margin-right: 0px;
|
||||
border-right: transparent;
|
||||
}*/
|
||||
QTabBar#MainTabBar::tab:top:hover {
|
||||
border-top-color: #5CD3FF;
|
||||
}
|
||||
QTabBar#MainTabBar::tab:top:selected {
|
||||
border-color: #5CD3FF;
|
||||
border-bottom-color: #C2C4C5;
|
||||
}
|
||||
QTabBar#SideTabBar {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
border-right-color: #5CD3FF;
|
||||
/*
|
||||
background: qlineargradient(
|
||||
x1: -3, y1: 0,
|
||||
x2: 1, y2: 0,
|
||||
stop: 0 #A3DAAA,
|
||||
stop: 1 #C2C4C5);
|
||||
*/
|
||||
}
|
||||
QTabBar#SideTabBar:disabled {
|
||||
border-color: transparent;
|
||||
border-right-color: #A3DAAA;
|
||||
}
|
||||
QTabBar#SideTabBar::tab {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
}/*
|
||||
QTabBar#SideTabBar::tab:left:first,
|
||||
QTabBar#SideTabBar::tab:right:first {
|
||||
margin-top: 0px;
|
||||
border-top: transparent;
|
||||
}
|
||||
QTabBar#SideTabBar::tab:left:last,
|
||||
QTabBar#SideTabBar::tab:right:last {
|
||||
margin-bottom: 0px;
|
||||
border-bottom: transparent;
|
||||
}*/
|
||||
QTabBar#SideTabBar::tab:disabled {
|
||||
color: transparent;
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
QStatusBar {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
border-top-color: #5CD3FF;
|
||||
border-bottom-color: #A3DAAA;
|
||||
background: qlineargradient(
|
||||
x1: 0, y1: 3,
|
||||
x2: 0, y2: 0,
|
||||
stop: 0 #A3DAAA,
|
||||
stop: 1 #C2C4C5);
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #5CD3FF;
|
||||
border-radius: 4px;
|
||||
padding: 1px;
|
||||
opacity: 200;
|
||||
}
|
||||
|
||||
QBalloonTip {
|
||||
color: #36393F;
|
||||
background-color: #C2C4C5;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #5CD3FF;
|
||||
border-radius: 4px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
/* Wrapper settings styling */
|
||||
QPushButton#WrapperWidgetButton {
|
||||
border-color: #DADDDE;
|
||||
}
|
||||
QPushButton#WrapperWidgetButton:disabled {
|
||||
border-color: #A8AAAB;
|
||||
}
|
||||
QScrollArea#WrapperSettingsScroll {
|
||||
border-color: #71DA7E;
|
||||
background-color: #BCBEBF;
|
||||
}
|
||||
QScrollBar#WrapperSettingsScrollBar {
|
||||
background-color: #BCBEBF;
|
||||
}
|
||||
QLabel#WrapperSettingsLabel {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
color: #999;
|
||||
border-color: #71DA7E;
|
||||
background-color: #BCBEBF;
|
||||
}
|
BIN
rare/resources/stylesheets/RareStyle/__init__.py
Normal file
14
rare/resources/stylesheets/RareStyle/stylesheet.qrc
Normal file
|
@ -0,0 +1,14 @@
|
|||
<RCC>
|
||||
<qresource prefix="stylesheets/RareStyle">
|
||||
<file>circle-disabled.svg</file>
|
||||
<file>circle.svg</file>
|
||||
<file>drop-down.svg</file>
|
||||
<file>half-square-disabled.svg</file>
|
||||
<file>half-square.svg</file>
|
||||
<file>sort-down.svg</file>
|
||||
<file>sort-up.svg</file>
|
||||
<file>square-disabled.svg</file>
|
||||
<file>square.svg</file>
|
||||
<file>stylesheet.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
|
@ -169,7 +169,7 @@ QComboBox QAbstractItemView {
|
|||
*::drop-down,
|
||||
*::drop-down:editable {
|
||||
width: 14px;
|
||||
image: url(":/icons/drop-down.svg");
|
||||
image: url(":/stylesheets/RareStyle/drop-down.svg");
|
||||
}
|
||||
*::up-button,
|
||||
*::down-button {
|
||||
|
@ -178,12 +178,12 @@ QComboBox QAbstractItemView {
|
|||
*::up-button {
|
||||
subcontrol-position: top right; /* position at the top right corner */
|
||||
border-bottom-width: 1;
|
||||
image: url(":/icons/sort-up.svg");
|
||||
image: url(":/stylesheets/RareStyle/sort-up.svg");
|
||||
}
|
||||
*::down-button {
|
||||
subcontrol-position: bottom right; /* position at bottom right corner */
|
||||
border-top-width: 1;
|
||||
image: url(":/icons/sort-down.svg");
|
||||
image: url(":/stylesheets/RareStyle/sort-down.svg");
|
||||
}
|
||||
QProgressBar {
|
||||
text-align: center;
|
||||
|
@ -415,7 +415,7 @@ QListView::indicator:checked,
|
|||
QTreeView::indicator:checked,
|
||||
QTableView::indicator:checked {
|
||||
border-radius: 2px;
|
||||
image: url(":/icons/square.svg");
|
||||
image: url(":/stylesheets/RareStyle/square.svg");
|
||||
}
|
||||
QGroupBox::indicator:indeterminate,
|
||||
QCheckBox::indicator:indeterminate,
|
||||
|
@ -423,28 +423,28 @@ QListView::indicator:indeterminate,
|
|||
QTreeView::indicator:indeterminate,
|
||||
QTableView::indicator:indeterminate {
|
||||
border-radius: 2px;
|
||||
image: url(":/icons/half-square.svg");
|
||||
image: url(":/stylesheets/RareStyle/half-square.svg");
|
||||
}
|
||||
QRadioButton::indicator:checked {
|
||||
border-radius: 5%;
|
||||
image: url(":/icons/circle.svg");
|
||||
image: url(":/stylesheets/RareStyle/circle.svg");
|
||||
}
|
||||
QGroupBox::indicator:checked:disabled,
|
||||
QCheckBox::indicator:checked:disabled,
|
||||
QListView::indicator:checked:disabled,
|
||||
QTreeView::indicator:checked:disabled,
|
||||
QTableView::indicator:checked:disabled {
|
||||
image: url(":/icons/square-disabled.svg");
|
||||
image: url(":/stylesheets/RareStyle/square-disabled.svg");
|
||||
}
|
||||
QGroupBox::indicator:indeterminate:disabled,
|
||||
QCheckBox::indicator:indeterminate:disabled,
|
||||
QListView::indicator:indeterminate:disabled,
|
||||
QTreeView::indicator:indeterminate:disabled,
|
||||
QTableView::indicator:indeterminate:disabled {
|
||||
image: url(":/icons/half-square-disabled.svg");
|
||||
image: url(":/stylesheets/RareStyle/half-square-disabled.svg");
|
||||
}
|
||||
QRadioButton::indicator:checked:disabled {
|
||||
image: url(":/icons/circle-disabled.svg");
|
||||
image: url(":/stylesheets/RareStyle/circle-disabled.svg");
|
||||
}
|
||||
|
||||
QGroupBox,
|
||||
|
|
3
rare/resources/stylesheets/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
import rare.resources.stylesheets.RareStyle
|
||||
# Incomplete
|
||||
# import rare.resources.stylesheets.ChildOfMetropolis
|
|
@ -23,7 +23,7 @@ from PyQt5.QtCore import (
|
|||
QDir,
|
||||
)
|
||||
from PyQt5.QtGui import QPalette, QColor, QPixmap, QImage
|
||||
from PyQt5.QtWidgets import QApplication, QStyleFactory
|
||||
from PyQt5.QtWidgets import qApp, QStyleFactory
|
||||
from legendary.models.game import Game
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
|
@ -180,19 +180,16 @@ def load_color_scheme(path: str) -> QPalette:
|
|||
|
||||
def set_color_pallete(color_scheme: str):
|
||||
if not color_scheme:
|
||||
QApplication.instance().setStyle(
|
||||
QStyleFactory.create(QApplication.instance().property("rareDefaultQtStyle"))
|
||||
)
|
||||
QApplication.instance().setStyleSheet("")
|
||||
QApplication.instance().setPalette(
|
||||
QApplication.instance().style().standardPalette()
|
||||
)
|
||||
qApp.setStyle(QStyleFactory.create(qApp.property("rareDefaultQtStyle")))
|
||||
qApp.setStyleSheet("")
|
||||
qApp.setPalette(qApp.style().standardPalette())
|
||||
return
|
||||
QApplication.instance().setStyle(QStyleFactory.create("Fusion"))
|
||||
qApp.setStyle(QStyleFactory.create("Fusion"))
|
||||
custom_palette = load_color_scheme(f":/schemes/{color_scheme}")
|
||||
if custom_palette is not None:
|
||||
QApplication.instance().setPalette(custom_palette)
|
||||
qtawesome.set_defaults(color=custom_palette.color(QPalette.Text))
|
||||
qApp.setPalette(custom_palette)
|
||||
icon_color = qApp.palette().color(QPalette.Foreground).name()
|
||||
qtawesome.set_defaults(color=icon_color)
|
||||
|
||||
|
||||
def get_color_schemes() -> List[str]:
|
||||
|
@ -204,18 +201,17 @@ def get_color_schemes() -> List[str]:
|
|||
|
||||
def set_style_sheet(style_sheet: str):
|
||||
if not style_sheet:
|
||||
QApplication.instance().setStyle(
|
||||
QStyleFactory.create(QApplication.instance().property("rareDefaultQtStyle"))
|
||||
)
|
||||
QApplication.instance().setStyleSheet("")
|
||||
qApp.setStyle(QStyleFactory.create(qApp.property("rareDefaultQtStyle")))
|
||||
qApp.setStyleSheet("")
|
||||
return
|
||||
QApplication.instance().setStyle(QStyleFactory.create("Fusion"))
|
||||
file = QFile(f":/stylesheets/{style_sheet}")
|
||||
qApp.setStyle(QStyleFactory.create("Fusion"))
|
||||
file = QFile(f":/stylesheets/{style_sheet}/stylesheet.qss")
|
||||
file.open(QFile.ReadOnly)
|
||||
stylesheet = file.readAll().data().decode("utf-8")
|
||||
|
||||
QApplication.instance().setStyleSheet(stylesheet)
|
||||
qtawesome.set_defaults(color="white")
|
||||
qApp.setStyleSheet(stylesheet)
|
||||
icon_color = qApp.palette().color(QPalette.Text).name()
|
||||
qtawesome.set_defaults(color="#eeeeee")
|
||||
|
||||
|
||||
def get_style_sheets() -> List[str]:
|
||||
|
|