Align a bunch of stuff
This commit is contained in:
parent
717945d729
commit
cb852b6912
|
@ -81,23 +81,24 @@ class UbiLinkWidget(QWidget):
|
|||
def __init__(self, game: Game, ubi_account_id):
|
||||
super(UbiLinkWidget, self).__init__()
|
||||
self.args = ArgumentsSingleton()
|
||||
self.setLayout(QHBoxLayout())
|
||||
layout = QHBoxLayout()
|
||||
self.game = game
|
||||
self.ubi_account_id = ubi_account_id
|
||||
|
||||
self.title_label = QLabel(game.app_title)
|
||||
self.layout().addWidget(self.title_label)
|
||||
layout.addWidget(self.title_label, stretch=1)
|
||||
|
||||
self.ok_indicator = QLabel()
|
||||
self.ok_indicator.setPixmap(icon("fa.info-circle", color="grey").pixmap(20, 20))
|
||||
self.ok_indicator.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
|
||||
self.layout().addWidget(self.ok_indicator)
|
||||
layout.addWidget(self.ok_indicator)
|
||||
|
||||
self.link_button = QPushButton(
|
||||
self.tr("Redeem to Ubisoft") + ": Test" if self.args.debug else ""
|
||||
)
|
||||
self.layout().addWidget(self.link_button)
|
||||
layout.addWidget(self.link_button)
|
||||
self.link_button.clicked.connect(self.activate)
|
||||
self.setLayout(layout)
|
||||
|
||||
def activate(self):
|
||||
self.link_button.setDisabled(True)
|
||||
|
|
|
@ -16,39 +16,8 @@ class Ui_LegendarySettings(object):
|
|||
LegendarySettings.setObjectName("LegendarySettings")
|
||||
LegendarySettings.resize(552, 312)
|
||||
LegendarySettings.setWindowTitle("LegendarySettings")
|
||||
self.gridLayout = QtWidgets.QGridLayout(LegendarySettings)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.right_layout = QtWidgets.QVBoxLayout()
|
||||
self.right_layout.setObjectName("right_layout")
|
||||
self.locale_group = QtWidgets.QGroupBox(LegendarySettings)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.locale_group.sizePolicy().hasHeightForWidth())
|
||||
self.locale_group.setSizePolicy(sizePolicy)
|
||||
self.locale_group.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||
self.locale_group.setObjectName("locale_group")
|
||||
self.locale_layout = QtWidgets.QVBoxLayout(self.locale_group)
|
||||
self.locale_layout.setObjectName("locale_layout")
|
||||
self.right_layout.addWidget(self.locale_group, 0, QtCore.Qt.AlignTop)
|
||||
self.cleanup_group = QtWidgets.QGroupBox(LegendarySettings)
|
||||
self.cleanup_group.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||
self.cleanup_group.setObjectName("cleanup_group")
|
||||
self.cleanup_layout = QtWidgets.QVBoxLayout(self.cleanup_group)
|
||||
self.cleanup_layout.setObjectName("cleanup_layout")
|
||||
self.clean_keep_manifests_button = QtWidgets.QPushButton(self.cleanup_group)
|
||||
self.clean_keep_manifests_button.setObjectName("clean_keep_manifests_button")
|
||||
self.cleanup_layout.addWidget(self.clean_keep_manifests_button)
|
||||
self.clean_button = QtWidgets.QPushButton(self.cleanup_group)
|
||||
self.clean_button.setObjectName("clean_button")
|
||||
self.cleanup_layout.addWidget(self.clean_button)
|
||||
self.refresh_game_meta_btn = QtWidgets.QPushButton(self.cleanup_group)
|
||||
self.refresh_game_meta_btn.setObjectName("refresh_game_meta_btn")
|
||||
self.cleanup_layout.addWidget(self.refresh_game_meta_btn)
|
||||
self.right_layout.addWidget(self.cleanup_group, 0, QtCore.Qt.AlignTop)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.right_layout.addItem(spacerItem)
|
||||
self.gridLayout.addLayout(self.right_layout, 0, 1, 1, 1)
|
||||
self.legendary_layout = QtWidgets.QHBoxLayout(LegendarySettings)
|
||||
self.legendary_layout.setObjectName("legendary_layout")
|
||||
self.left_layout = QtWidgets.QVBoxLayout()
|
||||
self.left_layout.setObjectName("left_layout")
|
||||
self.install_dir_group = QtWidgets.QGroupBox(LegendarySettings)
|
||||
|
@ -135,20 +104,46 @@ class Ui_LegendarySettings(object):
|
|||
self.verticalLayout = QtWidgets.QVBoxLayout(self.ubisoft_gb)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.left_layout.addWidget(self.ubisoft_gb, 0, QtCore.Qt.AlignTop)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.left_layout.addItem(spacerItem)
|
||||
self.legendary_layout.addLayout(self.left_layout)
|
||||
self.right_layout = QtWidgets.QVBoxLayout()
|
||||
self.right_layout.setObjectName("right_layout")
|
||||
self.locale_group = QtWidgets.QGroupBox(LegendarySettings)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.locale_group.sizePolicy().hasHeightForWidth())
|
||||
self.locale_group.setSizePolicy(sizePolicy)
|
||||
self.locale_group.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||
self.locale_group.setObjectName("locale_group")
|
||||
self.locale_layout = QtWidgets.QVBoxLayout(self.locale_group)
|
||||
self.locale_layout.setObjectName("locale_layout")
|
||||
self.right_layout.addWidget(self.locale_group, 0, QtCore.Qt.AlignTop)
|
||||
self.cleanup_group = QtWidgets.QGroupBox(LegendarySettings)
|
||||
self.cleanup_group.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||
self.cleanup_group.setObjectName("cleanup_group")
|
||||
self.cleanup_layout = QtWidgets.QVBoxLayout(self.cleanup_group)
|
||||
self.cleanup_layout.setObjectName("cleanup_layout")
|
||||
self.clean_keep_manifests_button = QtWidgets.QPushButton(self.cleanup_group)
|
||||
self.clean_keep_manifests_button.setObjectName("clean_keep_manifests_button")
|
||||
self.cleanup_layout.addWidget(self.clean_keep_manifests_button)
|
||||
self.clean_button = QtWidgets.QPushButton(self.cleanup_group)
|
||||
self.clean_button.setObjectName("clean_button")
|
||||
self.cleanup_layout.addWidget(self.clean_button)
|
||||
self.refresh_game_meta_btn = QtWidgets.QPushButton(self.cleanup_group)
|
||||
self.refresh_game_meta_btn.setObjectName("refresh_game_meta_btn")
|
||||
self.cleanup_layout.addWidget(self.refresh_game_meta_btn)
|
||||
self.right_layout.addWidget(self.cleanup_group, 0, QtCore.Qt.AlignTop)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.left_layout.addItem(spacerItem1)
|
||||
self.gridLayout.addLayout(self.left_layout, 0, 0, 1, 1)
|
||||
self.right_layout.addItem(spacerItem1)
|
||||
self.legendary_layout.addLayout(self.right_layout)
|
||||
|
||||
self.retranslateUi(LegendarySettings)
|
||||
QtCore.QMetaObject.connectSlotsByName(LegendarySettings)
|
||||
|
||||
def retranslateUi(self, LegendarySettings):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
self.locale_group.setTitle(_translate("LegendarySettings", "Locale"))
|
||||
self.cleanup_group.setTitle(_translate("LegendarySettings", "Cleanup"))
|
||||
self.clean_keep_manifests_button.setText(_translate("LegendarySettings", "Clean, but keep manifests"))
|
||||
self.clean_button.setText(_translate("LegendarySettings", "Remove everything"))
|
||||
self.refresh_game_meta_btn.setText(_translate("LegendarySettings", "Refresh game meta"))
|
||||
self.install_dir_group.setTitle(_translate("LegendarySettings", "Default Installation Directory"))
|
||||
self.download_group.setTitle(_translate("LegendarySettings", "Download Settings"))
|
||||
self.max_workers_label.setText(_translate("LegendarySettings", "Max Workers"))
|
||||
|
@ -160,6 +155,11 @@ class Ui_LegendarySettings(object):
|
|||
self.preferred_cdn_line.setPlaceholderText(_translate("LegendarySettings", "Default"))
|
||||
self.disable_https_label.setText(_translate("LegendarySettings", "Disable HTTPS"))
|
||||
self.ubisoft_gb.setTitle(_translate("LegendarySettings", "Link Ubisoft Games"))
|
||||
self.locale_group.setTitle(_translate("LegendarySettings", "Locale"))
|
||||
self.cleanup_group.setTitle(_translate("LegendarySettings", "Cleanup"))
|
||||
self.clean_keep_manifests_button.setText(_translate("LegendarySettings", "Clean, but keep manifests"))
|
||||
self.clean_button.setText(_translate("LegendarySettings", "Remove everything"))
|
||||
self.refresh_game_meta_btn.setText(_translate("LegendarySettings", "Refresh game meta"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -13,75 +13,8 @@
|
|||
<property name="windowTitle">
|
||||
<string notr="true">LegendarySettings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="right_layout">
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="QGroupBox" name="locale_group">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Locale</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="locale_layout"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="QGroupBox" name="cleanup_group">
|
||||
<property name="title">
|
||||
<string>Cleanup</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="cleanup_layout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="clean_keep_manifests_button">
|
||||
<property name="text">
|
||||
<string>Clean, but keep manifests</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clean_button">
|
||||
<property name="text">
|
||||
<string>Remove everything</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refresh_game_meta_btn">
|
||||
<property name="text">
|
||||
<string>Refresh game meta</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="right_vspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="legendary_layout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="left_layout">
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="QGroupBox" name="install_dir_group">
|
||||
|
@ -259,6 +192,73 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="right_layout">
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="QGroupBox" name="locale_group">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Locale</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="locale_layout"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="QGroupBox" name="cleanup_group">
|
||||
<property name="title">
|
||||
<string>Cleanup</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="cleanup_layout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="clean_keep_manifests_button">
|
||||
<property name="text">
|
||||
<string>Clean, but keep manifests</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clean_button">
|
||||
<property name="text">
|
||||
<string>Remove everything</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="refresh_game_meta_btn">
|
||||
<property name="text">
|
||||
<string>Refresh game meta</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="right_vspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
|
@ -15,10 +15,8 @@ class Ui_LinuxSettings(object):
|
|||
def setupUi(self, LinuxSettings):
|
||||
LinuxSettings.setObjectName("LinuxSettings")
|
||||
LinuxSettings.resize(109, 138)
|
||||
self.linux_layout = QtWidgets.QGridLayout(LinuxSettings)
|
||||
self.linux_layout = QtWidgets.QVBoxLayout(LinuxSettings)
|
||||
self.linux_layout.setObjectName("linux_layout")
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.linux_layout.addItem(spacerItem, 3, 0, 1, 1)
|
||||
self.wine_groupbox = QtWidgets.QGroupBox(LinuxSettings)
|
||||
self.wine_groupbox.setObjectName("wine_groupbox")
|
||||
self.wine_layout = QtWidgets.QFormLayout(self.wine_groupbox)
|
||||
|
@ -38,10 +36,12 @@ class Ui_LinuxSettings(object):
|
|||
self.exec_layout = QtWidgets.QVBoxLayout()
|
||||
self.exec_layout.setObjectName("exec_layout")
|
||||
self.wine_layout.setLayout(1, QtWidgets.QFormLayout.FieldRole, self.exec_layout)
|
||||
self.linux_layout.addWidget(self.wine_groupbox, 0, 0, 1, 1)
|
||||
self.linux_layout.addWidget(self.wine_groupbox)
|
||||
self.overlay_layout = QtWidgets.QVBoxLayout()
|
||||
self.overlay_layout.setObjectName("overlay_layout")
|
||||
self.linux_layout.addLayout(self.overlay_layout, 1, 0, 1, 1)
|
||||
self.linux_layout.addLayout(self.overlay_layout)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.linux_layout.addItem(spacerItem)
|
||||
|
||||
self.retranslateUi(LinuxSettings)
|
||||
QtCore.QMetaObject.connectSlotsByName(LinuxSettings)
|
||||
|
|
|
@ -13,21 +13,8 @@
|
|||
<property name="windowTitle">
|
||||
<string>LinuxSettings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="linux_layout">
|
||||
<item row="3" column="0">
|
||||
<spacer name="linux_vspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="linux_layout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="wine_groupbox">
|
||||
<property name="title">
|
||||
<string>Wine Settings</string>
|
||||
|
@ -65,9 +52,22 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="overlay_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="linux_vspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
|
@ -107,7 +107,7 @@ class Ui_EosWidget(object):
|
|||
self.verticalLayout_4.addWidget(self.label)
|
||||
self.install_button = QtWidgets.QPushButton(self.install_overlay_gb)
|
||||
self.install_button.setObjectName("install_button")
|
||||
self.verticalLayout_4.addWidget(self.install_button)
|
||||
self.verticalLayout_4.addWidget(self.install_button, 0, QtCore.Qt.AlignRight)
|
||||
self.install_overlay_page_layout.addWidget(self.install_overlay_gb, 0, QtCore.Qt.AlignTop)
|
||||
self.info_stack.addWidget(self.install_overlay_page)
|
||||
self.eos_layout.addWidget(self.info_stack)
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item alignment="Qt::AlignRight">
|
||||
<widget class="QPushButton" name="install_button">
|
||||
<property name="text">
|
||||
<string>Install</string>
|
||||
|
|
|
@ -407,6 +407,7 @@ class SideTabContainer(QWidget):
|
|||
widget.layout().setContentsMargins(0, 0, 9, 0)
|
||||
widget.title = self.title
|
||||
widget.title.setTitle = self.setTitle
|
||||
self.scroll.setMinimumWidth(widget.width())
|
||||
self.scroll.setWidget(widget)
|
||||
|
||||
layout = QVBoxLayout()
|
||||
|
|
Loading…
Reference in a new issue