Fix a few issues around refactoring the stylesheets.
Properly set object names for install and uninstall buttons in dialogs Change margins on widgets that are put into scrollareas Add top margin only on checkable QGroupBox Remove padding from QToolBox
This commit is contained in:
parent
9e077f74ed
commit
a26b977bda
|
@ -45,6 +45,8 @@ class InstallDialog(QDialog):
|
|||
self.ui.setupUi(self)
|
||||
self.setAttribute(Qt.WA_DeleteOnClose, True)
|
||||
self.setWindowFlags(Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint)
|
||||
# lk: set object names for CSS properties
|
||||
self.ui.install_button.setObjectName("InstallButton")
|
||||
|
||||
self.core = LegendaryCoreSingleton()
|
||||
self.rgame = rgame
|
||||
|
|
|
@ -33,10 +33,11 @@ class UninstallDialog(QDialog):
|
|||
self.keep_config = QCheckBox(self.tr("Keep game configuation."))
|
||||
self.keep_config.setChecked(bool(options.keep_config))
|
||||
|
||||
self.ok_button = QPushButton(
|
||||
self.uninstall_button = QPushButton(
|
||||
icon("ei.remove-circle", color="red"), self.tr("Uninstall")
|
||||
)
|
||||
self.ok_button.clicked.connect(self.__on_uninstall)
|
||||
self.uninstall_button.setObjectName("UninstallButton")
|
||||
self.uninstall_button.clicked.connect(self.__on_uninstall)
|
||||
|
||||
self.cancel_button = QPushButton(self.tr("Cancel"))
|
||||
self.cancel_button.clicked.connect(self.__on_cancel)
|
||||
|
@ -47,9 +48,9 @@ class UninstallDialog(QDialog):
|
|||
form_layout.addWidget(self.keep_config)
|
||||
|
||||
button_layout = QHBoxLayout()
|
||||
button_layout.addWidget(self.ok_button)
|
||||
button_layout.addStretch(1)
|
||||
button_layout.addWidget(self.cancel_button)
|
||||
button_layout.addStretch(1)
|
||||
button_layout.addWidget(self.uninstall_button)
|
||||
|
||||
layout = QVBoxLayout()
|
||||
layout.addWidget(self.info_text)
|
||||
|
|
Binary file not shown.
|
@ -425,15 +425,18 @@ QRadioButton::indicator:checked:disabled {
|
|||
|
||||
QGroupBox {
|
||||
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[checkable="true"] {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
QToolBox {
|
||||
font-weight: bold;
|
||||
padding: 0px;
|
||||
}
|
||||
QToolBox::tab,
|
||||
QGroupBox::title {
|
||||
|
|
Binary file not shown.
|
@ -431,15 +431,18 @@ QRadioButton::indicator:checked:disabled {
|
|||
|
||||
QGroupBox {
|
||||
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[checkable="true"] {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
QToolBox {
|
||||
font-weight: bold;
|
||||
padding: 0px;
|
||||
}
|
||||
QToolBox::tab,
|
||||
QGroupBox::title {
|
||||
|
|
|
@ -14,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_DownloadsTab(object):
|
||||
def setupUi(self, DownloadsTab):
|
||||
DownloadsTab.setObjectName("DownloadsTab")
|
||||
DownloadsTab.resize(677, 195)
|
||||
DownloadsTab.resize(677, 203)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
|
@ -161,7 +161,7 @@ class Ui_DownloadsTab(object):
|
|||
self.queue_scroll_contents.setSizePolicy(sizePolicy)
|
||||
self.queue_scroll_contents.setObjectName("queue_scroll_contents")
|
||||
self.queue_scroll_contents_layout = QtWidgets.QVBoxLayout(self.queue_scroll_contents)
|
||||
self.queue_scroll_contents_layout.setContentsMargins(0, 0, 9, 0)
|
||||
self.queue_scroll_contents_layout.setContentsMargins(0, 0, 3, 0)
|
||||
self.queue_scroll_contents_layout.setObjectName("queue_scroll_contents_layout")
|
||||
self.queue_scroll.setWidget(self.queue_scroll_contents)
|
||||
self.downloads_tab_layout.addWidget(self.queue_scroll)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>677</width>
|
||||
<height>195</height>
|
||||
<height>203</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -254,7 +254,7 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'rare/ui/components/tabs/games/game_info/game_settings.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.6
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
@ -14,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_GameSettings(object):
|
||||
def setupUi(self, GameSettings):
|
||||
GameSettings.setObjectName("GameSettings")
|
||||
GameSettings.resize(448, 310)
|
||||
GameSettings.resize(263, 258)
|
||||
self.game_settings_layout = QtWidgets.QVBoxLayout(GameSettings)
|
||||
self.game_settings_layout.setObjectName("game_settings_layout")
|
||||
self.launch_settings_group = QtWidgets.QGroupBox(GameSettings)
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>448</width>
|
||||
<height>310</height>
|
||||
<width>263</width>
|
||||
<height>258</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
|
@ -307,7 +307,7 @@ class SideTabContainer(QWidget):
|
|||
self.scrollarea.setFrameStyle(QScrollArea.NoFrame)
|
||||
if widget.layout():
|
||||
widget.layout().setAlignment(Qt.AlignTop)
|
||||
widget.layout().setContentsMargins(0, 0, 9, 0)
|
||||
widget.layout().setContentsMargins(0, 0, 3, 0)
|
||||
widget.title = self.title
|
||||
widget.title.setTitle = self.setTitle
|
||||
self.scrollarea.setMinimumWidth(
|
||||
|
|
Loading…
Reference in a new issue