1
0
Fork 0
mirror of synced 2024-06-10 22:54:41 +12:00

Stylesheets: Refactor css widget selectors based on objectName()

The `objectName()` of onstall and uninstall buttons should be set
to `InstallButton` and `UninstallButton` respectively for them to
pick up their special CSS properties.

Make QToolBox tab text bold

Clean-up deprecated widget object names in the CSS
This commit is contained in:
loathingKernel 2023-01-25 17:08:43 +02:00
parent 020d225f97
commit 9e077f74ed
6 changed files with 32 additions and 90 deletions

View file

@ -81,7 +81,7 @@ class GameListHeadBar(QWidget):
integrations.setPopupMode(QToolButton.InstantPopup)
self.search_bar = ButtonLineEdit("fa.search", placeholder_text=self.tr("Search Game"))
self.search_bar.setObjectName("search_bar")
self.search_bar.setObjectName("SearchBar")
self.search_bar.setFrame(False)
self.search_bar.setMinimumWidth(200)

View file

@ -46,6 +46,10 @@ class EOSGroup(QGroupBox, Ui_EosWidget):
def __init__(self, parent=None):
super(EOSGroup, self).__init__(parent=parent)
self.setupUi(self)
# lk: set object names for CSS properties
self.install_button.setObjectName("InstallButton")
self.uninstall_button.setObjectName("UninstallButton")
self.core = LegendaryCoreSingleton()
self.signals = GlobalSignalsSingleton()

View file

@ -320,50 +320,24 @@ QPushButton::menu-indicator {
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 {
QPushButton#InstallButton {
background-color: #F9A7FF;
}
QPushButton[install="1"]:hover,
QPushButton#install_button:hover {
QPushButton#InstallButton:hover {
background-color: #BB7DBF;
}
QPushButton[install="1"]:disabled,
QPushButton#install_button:disabled {
QPushButton#InstallButton:disabled {
background-color: #7D5380;
}
QPushButton[uninstall="1"],
QPushButton#uninstall_button {
QPushButton#UninstallButton {
background-color: #FFB085;
}
QPushButton[uninstall="1"]:hover,
QPushButton#uninstall_button:hover {
QPushButton#UninstallButton:hover {
background-color: #BF8464;
}
QPushButton[uninstall="1"]:disabled,
QPushButton#uninstall_button:disabled {
QPushButton#UninstallButton:disabled {
background-color: #805843;
}
QPushButton#success{
background-color: lime;
}
QPushButton#installed_menu_button:hover {
background-color: green;
}
QGroupBox,
QCheckBox,
@ -391,7 +365,7 @@ QTableView::indicator {
height: 11px;
}
QGroupBox::indicator {
padding: 1px;
padding: 0px;
}
QGroupBox::indicator:disabled,
QCheckBox::indicator:disabled,
@ -449,9 +423,7 @@ QRadioButton::indicator:checked:disabled {
image: url(":/stylesheets/ChildOfMetropolis/circle-disabled.svg");
}
QGroupBox,
QGroupBox#group,
QGroupBox#settings_widget {
QGroupBox {
font-weight: bold;
margin-top: 0.5em;
/* margin-left: 0.5em; /* Offset to the left */
@ -460,10 +432,8 @@ QGroupBox#settings_widget {
border-radius: 4px;
padding-top: 1.2em;
}
QGroupBox#game_widget_icon {
margin: 2px;
border-width: 0px;
padding: 0px;
QToolBox {
font-weight: bold;
}
QToolBox::tab,
QGroupBox::title {
@ -496,11 +466,7 @@ QSizeGrip {
height: 4px;
}
#list_widget {
border-top-width: 2px;
}
#search_bar {
QLineEdit#SearchBar {
padding: 3px;
border-radius: 5px;
background-color: #DADDDE;

View file

@ -320,50 +320,30 @@ QPushButton::menu-indicator {
left: -2px;
border-style: none;
}
QPushButton#menu {
padding: 0px;
margin: 0px;
border-style: none;
}
QPushButton#menu_button {
border-width: 0px;
background-color: rgb( 60, 63, 65);
width: 18px;
height: 18px;
}
QPushButton#menu_button:hover {
background-color: rgb( 51, 51, 68);
}
QPushButton[install="1"],
QPushButton#install_button {
QPushButton#InstallButton {
border-color: rgb( 0, 119, 0);
background-color: rgb( 0, 119, 0);
}
QPushButton[install="1"]:hover,
QPushButton#install_button:hover {
QPushButton#InstallButton:hover {
border-color: rgb( 0, 85, 0);
background-color: rgb( 0, 85, 0);
}
QPushButton[install="1"]:disabled,
QPushButton#install_button:disabled {
QPushButton#InstallButton:disabled {
border-color: rgb( 0, 34, 0);
background-color: rgb( 0, 34, 0);
}
QPushButton[uninstall="1"],
QPushButton#uninstall_button {
QPushButton#UninstallButton {
border-color: rgb(119, 0, 0);
background-color: rgb(119, 0, 0);
}
QPushButton[uninstall="1"]:hover,
QPushButton#uninstall_button:hover {
QPushButton#UninstallButton:hover {
border-color: rgb( 85, 0, 0);
background-color: rgb( 85, 0, 0);
}
QPushButton[uninstall="1"]:disabled,
QPushButton#uninstall_button:disabled {
QPushButton#UninstallButton:disabled {
border-color: rgb( 34, 0, 0);
background-color: rgb( 34, 0, 0);
}
QPushButton#success{
background-color: lime;
}
QPushButton#installed_menu_button:hover {
background-color: green;
}
QGroupBox,
QCheckBox,
@ -449,9 +429,7 @@ QRadioButton::indicator:checked:disabled {
image: url(":/stylesheets/RareStyle/circle-disabled.svg");
}
QGroupBox,
QGroupBox#group,
QGroupBox#settings_widget {
QGroupBox {
font-weight: bold;
margin-top: 0.5em;
/* margin-left: 0.5em; /* Offset to the left */
@ -460,10 +438,8 @@ QGroupBox#settings_widget {
border-radius: 4px;
padding-top: 1.2em;
}
QGroupBox#game_widget_icon {
margin: 2px;
border-width: 0px;
padding: 0px;
QToolBox {
font-weight: bold;
}
QToolBox::tab,
QGroupBox::title {
@ -496,11 +472,7 @@ QSizeGrip {
height: 4px;
}
#list_widget {
border-top-width: 2px;
}
#search_bar {
QLineEdit#SearchBar {
padding: 3px;
border-radius: 5px;
background-color: rgb( 51, 51, 68);