1
0
Fork 0
mirror of synced 2024-06-29 03:31:06 +12:00
Rare/rare/components/tabs/settings/legendary_ui.py
Stelios Tsampas b138766f1d Updated the settings UI to use widgets generated through Qt Designer
Since many lines were changed due to components being reused, the more
important are listed below per file. Static strings were moved to the UI files for
translation purposes and some messages have been re-worded.

`extra_widgets.py`: PathEdit now contains the save button and the dialog can also filter by name, all forms using it have been updated
`rare.py`: Updated the look and fixed a bug where the Image Directory wouldn't change if `img_dir` wasn't specified in the settings file
`legendary.py`: Update the look, changed the Max Workers option into a SpinBox
`linux.py`: Update the look, changed Wine Executable option in to a PathEdit that filters for `wine` and `wine64`.
`game_settings.py`: Updated to reflect the changes in `linux.py` settings widget.  Added the system `compatibilitytools.d` to be search for potential proton versions
2021-05-18 01:57:20 +03:00

86 lines
4.6 KiB
Python

# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/ui/components/tabs/settings/legendary.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# 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.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_LegendarySettings(object):
def setupUi(self, LegendarySettings):
LegendarySettings.setObjectName("LegendarySettings")
LegendarySettings.resize(647, 476)
self.layout_legendary = QtWidgets.QGridLayout(LegendarySettings)
self.layout_legendary.setObjectName("layout_legendary")
self.gb_install_dir = QtWidgets.QGroupBox(LegendarySettings)
self.gb_install_dir.setObjectName("gb_install_dir")
self.layout_install_dir = QtWidgets.QVBoxLayout(self.gb_install_dir)
self.layout_install_dir.setObjectName("layout_install_dir")
self.layout_legendary.addWidget(self.gb_install_dir, 0, 0, 1, 1)
self.gb_downloads = QtWidgets.QGroupBox(LegendarySettings)
self.gb_downloads.setObjectName("gb_downloads")
self.layout_downloads = QtWidgets.QGridLayout(self.gb_downloads)
self.layout_downloads.setObjectName("layout_downloads")
self.lbl_max_workers = QtWidgets.QLabel(self.gb_downloads)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lbl_max_workers.sizePolicy().hasHeightForWidth())
self.lbl_max_workers.setSizePolicy(sizePolicy)
self.lbl_max_workers.setObjectName("lbl_max_workers")
self.layout_downloads.addWidget(self.lbl_max_workers, 0, 0, 1, 1)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.layout_downloads.addItem(spacerItem, 0, 3, 1, 1)
self.max_worker_select = QtWidgets.QSpinBox(self.gb_downloads)
self.max_worker_select.setObjectName("max_worker_select")
self.layout_downloads.addWidget(self.max_worker_select, 0, 1, 1, 1)
self.lbl_max_workers_info = QtWidgets.QLabel(self.gb_downloads)
font = QtGui.QFont()
font.setItalic(True)
self.lbl_max_workers_info.setFont(font)
self.lbl_max_workers_info.setObjectName("lbl_max_workers_info")
self.layout_downloads.addWidget(self.lbl_max_workers_info, 0, 2, 1, 1)
self.layout_legendary.addWidget(self.gb_downloads, 1, 0, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.layout_legendary.addItem(spacerItem1, 2, 0, 1, 2)
self.gb_clean = QtWidgets.QGroupBox(LegendarySettings)
self.gb_clean.setObjectName("gb_clean")
self.layout_clean = QtWidgets.QVBoxLayout(self.gb_clean)
self.layout_clean.setObjectName("layout_clean")
self.clean_button_without_manifests = QtWidgets.QPushButton(self.gb_clean)
self.clean_button_without_manifests.setObjectName("clean_button_without_manifests")
self.layout_clean.addWidget(self.clean_button_without_manifests)
self.clean_button = QtWidgets.QPushButton(self.gb_clean)
self.clean_button.setObjectName("clean_button")
self.layout_clean.addWidget(self.clean_button)
self.layout_legendary.addWidget(self.gb_clean, 0, 1, 1, 1)
self.retranslateUi(LegendarySettings)
QtCore.QMetaObject.connectSlotsByName(LegendarySettings)
def retranslateUi(self, LegendarySettings):
_translate = QtCore.QCoreApplication.translate
LegendarySettings.setWindowTitle(_translate("LegendarySettings", "LegendarySettings"))
self.gb_install_dir.setTitle(_translate("LegendarySettings", "Default Installation Directory"))
self.gb_downloads.setTitle(_translate("LegendarySettings", "Download Settings"))
self.lbl_max_workers.setText(_translate("LegendarySettings", "Max Workers:"))
self.lbl_max_workers_info.setText(_translate("LegendarySettings", "Less is slower (0: Default)"))
self.gb_clean.setTitle(_translate("LegendarySettings", "Cleanup"))
self.clean_button_without_manifests.setText(_translate("LegendarySettings", "Clean, but keep manifests"))
self.clean_button.setText(_translate("LegendarySettings", "Remove everything"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
LegendarySettings = QtWidgets.QWidget()
ui = Ui_LegendarySettings()
ui.setupUi(LegendarySettings)
LegendarySettings.show()
sys.exit(app.exec_())