Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # rare/components/tabs/games/game_info/__init__.py
This commit is contained in:
commit
df726c0c57
14
rare/app.py
14
rare/app.py
|
@ -7,14 +7,14 @@ import time
|
||||||
|
|
||||||
from PyQt5.QtCore import QSettings, QTranslator
|
from PyQt5.QtCore import QSettings, QTranslator
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtGui import QIcon
|
||||||
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon
|
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QStyleFactory
|
||||||
|
|
||||||
from custom_legendary.core import LegendaryCore
|
from custom_legendary.core import LegendaryCore
|
||||||
from rare import lang_path, style_path
|
from rare import lang_path, style_path
|
||||||
from rare.components.dialogs.launch_dialog import LaunchDialog
|
from rare.components.dialogs.launch_dialog import LaunchDialog
|
||||||
from rare.components.main_window import MainWindow
|
from rare.components.main_window import MainWindow
|
||||||
from rare.components.tray_icon import TrayIcon
|
from rare.components.tray_icon import TrayIcon
|
||||||
from rare.utils.utils import get_lang
|
from rare.utils.utils import get_lang, load_color_scheme
|
||||||
|
|
||||||
start_time = time.strftime('%y-%m-%d--%H:%M') # year-month-day-hour-minute
|
start_time = time.strftime('%y-%m-%d--%H:%M') # year-month-day-hour-minute
|
||||||
file_name = os.path.expanduser(f"~/.cache/rare/logs/Rare_{start_time}.log")
|
file_name = os.path.expanduser(f"~/.cache/rare/logs/Rare_{start_time}.log")
|
||||||
|
@ -67,8 +67,14 @@ class App(QApplication):
|
||||||
self.installTranslator(self.translator)
|
self.installTranslator(self.translator)
|
||||||
|
|
||||||
# Style
|
# Style
|
||||||
self.setStyleSheet(open(style_path + "RareStyle.qss").read())
|
self.setStyle(QStyleFactory.create("Fusion"))
|
||||||
self.setWindowIcon(QIcon(style_path + "Logo.png"))
|
if (color := settings.value("color_scheme", None)) is not None:
|
||||||
|
custom_palette = load_color_scheme(os.path.join(style_path, "colors", color + ".scheme"))
|
||||||
|
if custom_palette is not None:
|
||||||
|
self.setPalette(custom_palette)
|
||||||
|
if (style := settings.value("style_sheet", None)) is not None:
|
||||||
|
self.setStyleSheet(open(os.path.join(style_path, "qss", style + ".qss")).read())
|
||||||
|
self.setWindowIcon(QIcon(os.path.join(style_path + "Logo.png")))
|
||||||
|
|
||||||
# launch app
|
# launch app
|
||||||
self.launch_dialog = LaunchDialog(self.core, args.offline)
|
self.launch_dialog = LaunchDialog(self.core, args.offline)
|
||||||
|
|
|
@ -26,7 +26,7 @@ class InstallDialog(QDialog):
|
||||||
if not default_path:
|
if not default_path:
|
||||||
default_path = os.path.expanduser("~/legendary")
|
default_path = os.path.expanduser("~/legendary")
|
||||||
if not update:
|
if not update:
|
||||||
self.install_path_field = PathEdit(text=default_path, type_of_file=QFileDialog.DirectoryOnly)
|
self.install_path_field = PathEdit(text=default_path, file_type=QFileDialog.DirectoryOnly)
|
||||||
self.form.addRow(QLabel("Install directory"), self.install_path_field)
|
self.form.addRow(QLabel("Install directory"), self.install_path_field)
|
||||||
|
|
||||||
if self.core.lgd.config.has_option("Legendary", "max_workers"):
|
if self.core.lgd.config.has_option("Legendary", "max_workers"):
|
||||||
|
|
|
@ -63,9 +63,10 @@ class GameInfo(QScrollArea):
|
||||||
verify_game = pyqtSignal(str)
|
verify_game = pyqtSignal(str)
|
||||||
verify_threads = {}
|
verify_threads = {}
|
||||||
|
|
||||||
|
grade_table = json.load(open(os.path.expanduser("~/.cache/rare/game_list.json")))
|
||||||
|
|
||||||
def __init__(self, core: LegendaryCore, parent):
|
def __init__(self, core: LegendaryCore, parent):
|
||||||
super(GameInfo, self).__init__(parent=parent)
|
super(GameInfo, self).__init__(parent=parent)
|
||||||
self.grade_table = json.load(open(os.path.expanduser("~/.cache/rare/game_list.json")))
|
|
||||||
|
|
||||||
self.ratings = {"platinum": self.tr("Platimum"),
|
self.ratings = {"platinum": self.tr("Platimum"),
|
||||||
"gold": self.tr("Gold"),
|
"gold": self.tr("Gold"),
|
||||||
|
|
|
@ -1,17 +1,36 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from PyQt5.QtCore import QSettings
|
from PyQt5.QtCore import QSettings
|
||||||
from PyQt5.QtWidgets import QWidget, QLabel, QVBoxLayout, QComboBox, QFileDialog, QPushButton, QMessageBox, QLineEdit, \
|
from PyQt5.QtWidgets import QWidget, QFileDialog, QMessageBox
|
||||||
QScrollArea, QCheckBox
|
|
||||||
|
|
||||||
from custom_legendary.core import LegendaryCore
|
from custom_legendary.core import LegendaryCore
|
||||||
from custom_legendary.models.game import InstalledGame, Game
|
from custom_legendary.models.game import InstalledGame, Game
|
||||||
from rare.components.tabs.settings.linux import LinuxSettings
|
from rare.components.tabs.settings.linux import LinuxSettings
|
||||||
from rare.components.tabs.settings.settings_widget import SettingsWidget
|
from rare.ui.components.tabs.games.game_info.game_settings import Ui_GameSettings
|
||||||
from rare.utils.extra_widgets import PathEdit
|
from rare.utils.extra_widgets import PathEdit
|
||||||
|
|
||||||
|
|
||||||
class GameSettings(QScrollArea):
|
def find_proton_wrappers():
|
||||||
|
possible_proton_wrappers = []
|
||||||
|
compatibilitytools_dirs = [
|
||||||
|
os.path.expanduser("~/.steam/steam/steamapps/common"),
|
||||||
|
"/usr/share/steam/compatibilitytools.d"
|
||||||
|
]
|
||||||
|
for c in compatibilitytools_dirs:
|
||||||
|
if os.path.exists(c):
|
||||||
|
for i in os.listdir(c):
|
||||||
|
proton = os.path.join(c, i, "proton")
|
||||||
|
compatibilitytool = os.path.join(c, i, "compatibilitytool.vdf")
|
||||||
|
toolmanifest = os.path.join(c, i, "toolmanifest.vdf")
|
||||||
|
if os.path.exists(proton) and (os.path.exists(compatibilitytool) or os.path.exists(toolmanifest)):
|
||||||
|
wrapper = '"' + proton + '" run'
|
||||||
|
possible_proton_wrappers.append(wrapper)
|
||||||
|
if not possible_proton_wrappers:
|
||||||
|
print("Unable to find any Proton version")
|
||||||
|
return possible_proton_wrappers
|
||||||
|
|
||||||
|
|
||||||
|
class GameSettings(QWidget, Ui_GameSettings):
|
||||||
game: Game
|
game: Game
|
||||||
igame: InstalledGame
|
igame: InstalledGame
|
||||||
|
|
||||||
|
@ -20,138 +39,103 @@ class GameSettings(QScrollArea):
|
||||||
|
|
||||||
def __init__(self, core: LegendaryCore, parent):
|
def __init__(self, core: LegendaryCore, parent):
|
||||||
super(GameSettings, self).__init__(parent=parent)
|
super(GameSettings, self).__init__(parent=parent)
|
||||||
|
self.setupUi(self)
|
||||||
|
|
||||||
self.core = core
|
self.core = core
|
||||||
self.widget = QWidget()
|
|
||||||
self.settings = QSettings()
|
self.settings = QSettings()
|
||||||
self.setWidgetResizable(True)
|
self.offline.currentIndexChanged.connect(
|
||||||
self.layout = QVBoxLayout()
|
lambda x: self.update_combobox(x, "offline")
|
||||||
self.title = QLabel("Error")
|
)
|
||||||
self.layout.addWidget(self.title)
|
self.skip_update.currentIndexChanged.connect(
|
||||||
|
lambda x: self.update_combobox(x, "skip_update_check")
|
||||||
self.offline = QComboBox()
|
)
|
||||||
self.offline.addItems(["unset", "true", "false"])
|
self.cloud_sync.stateChanged.connect(
|
||||||
self.offline_widget = SettingsWidget(self.tr("Launch Game offline"), self.offline)
|
lambda: self.settings.setValue(f"{self.game.app_name}/auto_sync_cloud", self.cloud_sync.isChecked())
|
||||||
self.offline.currentIndexChanged.connect(lambda x: self.update_combobox(x, "offline"))
|
)
|
||||||
|
self.launch_params.textChanged.connect(lambda: self.launch_params_button.setEnabled(True))
|
||||||
self.skip_update = QComboBox()
|
self.launch_params_button.clicked.connect(
|
||||||
self.skip_update.addItems(["unset", "true", "false"])
|
lambda: self.save_line_edit("start_params", self.launch_params.text())
|
||||||
self.skip_update_widget = SettingsWidget(self.tr("Skip update check before launching"), self.skip_update)
|
)
|
||||||
self.layout.addWidget(self.skip_update_widget)
|
self.launch_params_button.setEnabled(False)
|
||||||
self.skip_update.currentIndexChanged.connect(lambda x: self.update_combobox(x, "skip_update_check"))
|
self.wrapper.textChanged.connect(lambda: self.wrapper_button.setEnabled(True))
|
||||||
|
self.wrapper_button.clicked.connect(
|
||||||
self.launch_params = QLineEdit("")
|
lambda: self.save_line_edit("wrapper", self.wrapper.text())
|
||||||
self.launch_params.setPlaceholderText(self.tr("Start parameter"))
|
)
|
||||||
self.launch_params_accept_button = QPushButton(self.tr("Save"))
|
self.wrapper_button.setEnabled(False)
|
||||||
self.launch_params_widget = SettingsWidget(self.tr("Launch parameters"), self.launch_params,
|
|
||||||
self.launch_params_accept_button)
|
|
||||||
self.layout.addWidget(self.launch_params_widget)
|
|
||||||
self.launch_params_accept_button.clicked.connect(
|
|
||||||
lambda: self.save_line_edit("start_params", self.launch_params.text()))
|
|
||||||
|
|
||||||
self.cloud_sync = QCheckBox("Sync with cloud")
|
|
||||||
self.cloud_sync_widget = SettingsWidget(self.tr("Auto sync with cloud"), self.cloud_sync)
|
|
||||||
self.layout.addWidget(self.cloud_sync_widget)
|
|
||||||
self.cloud_sync.stateChanged.connect(lambda: self.settings.setValue(f"{self.game.app_name}/auto_sync_cloud",
|
|
||||||
self.cloud_sync.isChecked()))
|
|
||||||
|
|
||||||
self.layout.addWidget(self.offline_widget)
|
|
||||||
|
|
||||||
self.wrapper = QLineEdit("")
|
|
||||||
self.wrapper.setPlaceholderText("Wrapper")
|
|
||||||
self.wrapper_save_button = QPushButton(self.tr("Save"))
|
|
||||||
self.wrapper_save_button.clicked.connect(lambda: self.save_line_edit("wrapper", self.wrapper.text()))
|
|
||||||
self.wrapper_widget = SettingsWidget(self.tr("Wrapper (e.g. optirun)"), self.wrapper, self.wrapper_save_button)
|
|
||||||
self.layout.addWidget(self.wrapper_widget)
|
|
||||||
|
|
||||||
if os.name != "nt":
|
if os.name != "nt":
|
||||||
|
self.possible_proton_wrappers = find_proton_wrappers()
|
||||||
|
|
||||||
|
self.proton_wrapper.addItems(self.possible_proton_wrappers)
|
||||||
|
self.proton_wrapper.currentIndexChanged.connect(self.change_proton)
|
||||||
|
|
||||||
|
self.proton_prefix = PathEdit("None", QFileDialog.DirectoryOnly, save_func=self.update_prefix)
|
||||||
|
self.proton_prefix_layout.addWidget(self.proton_prefix)
|
||||||
|
|
||||||
self.linux_settings = LinuxAppSettings(core)
|
self.linux_settings = LinuxAppSettings(core)
|
||||||
self.layout.addWidget(self.linux_settings)
|
self.linux_layout.addWidget(self.linux_settings)
|
||||||
|
|
||||||
self.possible_proton_wrappers = []
|
|
||||||
try:
|
|
||||||
for i in os.listdir(os.path.expanduser("~/.steam/steam/steamapps/common")):
|
|
||||||
if i.startswith("Proton"):
|
|
||||||
wrapper = '"' + os.path.join(os.path.expanduser("~/.steam/steam/steamapps/common"), i,
|
|
||||||
"proton") + '" run'
|
|
||||||
self.possible_proton_wrappers.append(wrapper)
|
|
||||||
except FileNotFoundError as e:
|
|
||||||
print("Unable to find any Proton version")
|
|
||||||
|
|
||||||
self.select_proton = QComboBox()
|
|
||||||
self.select_proton.addItems(["Don't use Proton"] + self.possible_proton_wrappers)
|
|
||||||
self.select_proton.currentIndexChanged.connect(self.change_proton)
|
|
||||||
self.select_proton_widget = SettingsWidget(self.tr("Proton Wrapper"), self.select_proton)
|
|
||||||
self.linux_settings.layout.addWidget(self.select_proton_widget)
|
|
||||||
|
|
||||||
self.proton_prefix = PathEdit("x", QFileDialog.DirectoryOnly)
|
|
||||||
self.proton_prefix_accept_button = QPushButton(self.tr("Save"))
|
|
||||||
self.proton_prefix_accept_button.clicked.connect(self.update_prefix)
|
|
||||||
self.proton_prefix_widget = SettingsWidget(self.tr("Proton prefix"), self.proton_prefix,
|
|
||||||
self.proton_prefix_accept_button)
|
|
||||||
self.linux_settings.layout.addWidget(self.proton_prefix_widget)
|
|
||||||
|
|
||||||
# startparams, skip_update_check
|
# startparams, skip_update_check
|
||||||
|
|
||||||
self.layout.addStretch(1)
|
|
||||||
self.widget.setLayout(self.layout)
|
|
||||||
self.setWidget(self.widget)
|
|
||||||
|
|
||||||
def save_line_edit(self, option, value):
|
def save_line_edit(self, option, value):
|
||||||
if value != "":
|
if value:
|
||||||
if not self.game.app_name in self.core.lgd.config.sections():
|
if self.game.app_name not in self.core.lgd.config.sections():
|
||||||
self.core.lgd.config.add_section(self.game.app_name)
|
self.core.lgd.config.add_section(self.game.app_name)
|
||||||
self.core.lgd.config.set(self.game.app_name, option, value)
|
self.core.lgd.config.set(self.game.app_name, option, value)
|
||||||
else:
|
else:
|
||||||
if self.game.app_name in self.core.lgd.config.sections() and self.core.lgd.config.get(
|
if self.game.app_name in self.core.lgd.config.sections() and self.core.lgd.config.get(
|
||||||
f"{self.game.app_name}", option, fallback="") != "":
|
f"{self.game.app_name}", option, fallback=None) is not None:
|
||||||
self.core.lgd.config.remove_option(self.game.app_name, option)
|
self.core.lgd.config.remove_option(self.game.app_name, option)
|
||||||
if not self.core.lgd.config.get(self.game.app_name):
|
if not self.core.lgd.config[self.game.app_name]:
|
||||||
self.core.lgd.config.remove_section(self.game.app_name)
|
self.core.lgd.config.remove_section(self.game.app_name)
|
||||||
self.core.lgd.save_config()
|
self.core.lgd.save_config()
|
||||||
|
self.sender().setEnabled(False)
|
||||||
|
|
||||||
def update_combobox(self, i, option):
|
def update_combobox(self, i, option):
|
||||||
if self.change:
|
if self.change:
|
||||||
# remove section
|
# remove section
|
||||||
if i == 0:
|
if i:
|
||||||
if self.game.app_name in self.core.lgd.config.sections():
|
if self.game.app_name not in self.core.lgd.config.sections():
|
||||||
if self.core.lgd.config.get(f"{self.game.app_name}", option, fallback="") != "":
|
|
||||||
self.core.lgd.config.remove_option(self.game.app_name, option)
|
|
||||||
if self.core.lgd.config[self.game.app_name] == {}:
|
|
||||||
self.core.lgd.config.remove_section(self.game.app_name)
|
|
||||||
elif i == 1:
|
|
||||||
self.core.lgd.config.add_section(self.game.app_name)
|
self.core.lgd.config.add_section(self.game.app_name)
|
||||||
|
if i == 1:
|
||||||
self.core.lgd.config.set(self.game.app_name, option, "true")
|
self.core.lgd.config.set(self.game.app_name, option, "true")
|
||||||
elif i == 2:
|
if i == 2:
|
||||||
self.core.lgd.config.add_section(self.game.app_name)
|
|
||||||
self.core.lgd.config.set(self.game.app_name, option, "false")
|
self.core.lgd.config.set(self.game.app_name, option, "false")
|
||||||
|
else:
|
||||||
|
if self.game.app_name in self.core.lgd.config.sections():
|
||||||
|
if self.core.lgd.config.get(f"{self.game.app_name}", option, fallback=False):
|
||||||
|
self.core.lgd.config.remove_option(self.game.app_name, option)
|
||||||
|
if not self.core.lgd.config[self.game.app_name]:
|
||||||
|
self.core.lgd.config.remove_section(self.game.app_name)
|
||||||
self.core.lgd.save_config()
|
self.core.lgd.save_config()
|
||||||
|
|
||||||
def change_proton(self, i):
|
def change_proton(self, i):
|
||||||
if self.change:
|
if self.change:
|
||||||
# Dont use Proton
|
# Dont use Proton
|
||||||
if i == 0:
|
if i == 0:
|
||||||
self.proton_prefix_widget.setVisible(False)
|
self.proton_prefix.setEnabled(False)
|
||||||
self.wrapper_widget.setVisible(True)
|
self.wrapper_widget.setEnabled(True)
|
||||||
|
self.linux_settings.wine_groupbox.setEnabled(True)
|
||||||
if f"{self.game.app_name}" in self.core.lgd.config.sections():
|
if f"{self.game.app_name}" in self.core.lgd.config.sections():
|
||||||
if self.core.lgd.config.get(f"{self.game.app_name}", "wrapper", fallback="") != "":
|
if self.core.lgd.config.get(f"{self.game.app_name}", "wrapper", fallback=False):
|
||||||
self.core.lgd.config.remove_option(self.game.app_name, "wrapper")
|
self.core.lgd.config.remove_option(self.game.app_name, "wrapper")
|
||||||
if self.core.lgd.config.get(f"{self.game.app_name}", "no_wine", fallback="") != "":
|
if self.core.lgd.config.get(f"{self.game.app_name}", "no_wine", fallback=False):
|
||||||
self.core.lgd.config.remove_option(self.game.app_name, "no_wine")
|
self.core.lgd.config.remove_option(self.game.app_name, "no_wine")
|
||||||
if self.core.lgd.config[self.game.app_name] == {}:
|
if not self.core.lgd.config[self.game.app_name]:
|
||||||
self.core.lgd.config.remove_section(self.game.app_name)
|
self.core.lgd.config.remove_section(self.game.app_name)
|
||||||
if f"{self.game.app_name}.env" in self.core.lgd.config.sections():
|
if f"{self.game.app_name}.env" in self.core.lgd.config.sections():
|
||||||
if self.core.lgd.config.get(f"{self.game.app_name}.env", "STEAM_COMPAT_DATA_PATH",
|
if self.core.lgd.config.get(f"{self.game.app_name}.env", "STEAM_COMPAT_DATA_PATH", fallback=False):
|
||||||
fallback="") != "":
|
|
||||||
self.core.lgd.config.remove_option(f"{self.game.app_name}.env", "STEAM_COMPAT_DATA_PATH")
|
self.core.lgd.config.remove_option(f"{self.game.app_name}.env", "STEAM_COMPAT_DATA_PATH")
|
||||||
if self.core.lgd.config[self.game.app_name + ".env"] == {}:
|
if not self.core.lgd.config[self.game.app_name + ".env"]:
|
||||||
self.core.lgd.config.remove_section(self.game.app_name + ".env")
|
self.core.lgd.config.remove_section(self.game.app_name + ".env")
|
||||||
else:
|
else:
|
||||||
self.proton_prefix_widget.setVisible(True)
|
self.proton_prefix.setEnabled(True)
|
||||||
self.wrapper_widget.setVisible(False)
|
self.wrapper_widget.setEnabled(False)
|
||||||
|
self.linux_settings.wine_groupbox.setEnabled(False)
|
||||||
wrapper = self.possible_proton_wrappers[i - 1]
|
wrapper = self.possible_proton_wrappers[i - 1]
|
||||||
if not self.game.app_name in self.core.lgd.config.sections():
|
if self.game.app_name not in self.core.lgd.config.sections():
|
||||||
self.core.lgd.config[self.game.app_name] = {}
|
self.core.lgd.config[self.game.app_name] = {}
|
||||||
if not self.game.app_name + ".env" in self.core.lgd.config.sections():
|
if self.game.app_name + ".env" not in self.core.lgd.config.sections():
|
||||||
self.core.lgd.config[self.game.app_name + ".env"] = {}
|
self.core.lgd.config[self.game.app_name + ".env"] = {}
|
||||||
self.core.lgd.config.set(self.game.app_name, "wrapper", wrapper)
|
self.core.lgd.config.set(self.game.app_name, "wrapper", wrapper)
|
||||||
self.core.lgd.config.set(self.game.app_name, "no_wine", "true")
|
self.core.lgd.config.set(self.game.app_name, "no_wine", "true")
|
||||||
|
@ -160,16 +144,16 @@ class GameSettings(QScrollArea):
|
||||||
self.proton_prefix.text_edit.setText(os.path.expanduser("~/.proton"))
|
self.proton_prefix.text_edit.setText(os.path.expanduser("~/.proton"))
|
||||||
|
|
||||||
# Dont use Wine
|
# Dont use Wine
|
||||||
self.linux_settings.select_wine_exec.setText("")
|
self.linux_settings.wine_exec.text_edit.setText("")
|
||||||
self.linux_settings.save_setting(self.linux_settings.select_wine_exec, "wine_exec")
|
self.linux_settings.save_setting(self.linux_settings.wine_exec, "wine_exec")
|
||||||
self.linux_settings.select_path.text_edit.setText("")
|
self.linux_settings.wine_prefix.text_edit.setText("")
|
||||||
self.linux_settings.save_setting(self.linux_settings.select_path, "wine_prefix")
|
self.linux_settings.save_setting(self.linux_settings.wine_prefix, "wine_prefix")
|
||||||
|
|
||||||
self.core.lgd.save_config()
|
self.core.lgd.save_config()
|
||||||
|
|
||||||
def update_prefix(self):
|
def update_prefix(self):
|
||||||
text = self.proton_prefix.text()
|
text = self.proton_prefix.text()
|
||||||
if text == "":
|
if not text:
|
||||||
text = os.path.expanduser("~/.proton")
|
text = os.path.expanduser("~/.proton")
|
||||||
self.proton_prefix.text_edit.setText(text)
|
self.proton_prefix.text_edit.setText(text)
|
||||||
if not os.path.exists(text):
|
if not os.path.exists(text):
|
||||||
|
@ -197,9 +181,9 @@ class GameSettings(QScrollArea):
|
||||||
else:
|
else:
|
||||||
self.offline.setCurrentIndex(0)
|
self.offline.setCurrentIndex(0)
|
||||||
|
|
||||||
self.offline_widget.setVisible(True)
|
self.offline.setEnabled(True)
|
||||||
else:
|
else:
|
||||||
self.offline_widget.setVisible(False)
|
self.offline.setEnabled(False)
|
||||||
|
|
||||||
skip_update = self.core.lgd.config.get(self.game.app_name, "skip_update_check", fallback="unset")
|
skip_update = self.core.lgd.config.get(self.game.app_name, "skip_update_check", fallback="unset")
|
||||||
if skip_update == "true":
|
if skip_update == "true":
|
||||||
|
@ -215,25 +199,25 @@ class GameSettings(QScrollArea):
|
||||||
self.title.setText(f"<h2>{self.game.app_title}</h2>")
|
self.title.setText(f"<h2>{self.game.app_title}</h2>")
|
||||||
if os.name != "nt":
|
if os.name != "nt":
|
||||||
self.linux_settings.update_game(app_name)
|
self.linux_settings.update_game(app_name)
|
||||||
self.linux_settings.dxvk_widget.update_settings(app_name)
|
self.linux_settings.dxvk.update_settings(app_name)
|
||||||
proton = self.core.lgd.config.get(f"{app_name}", "wrapper", fallback="").replace('"', "")
|
proton = self.core.lgd.config.get(f"{app_name}", "wrapper", fallback="").replace('"', "")
|
||||||
if proton != "":
|
if proton != "":
|
||||||
self.proton_prefix_widget.setVisible(True)
|
self.proton_prefix.setEnabled(True)
|
||||||
self.select_proton.setCurrentText(f'"{proton.replace(" run", "")}" run')
|
self.proton_wrapper.setCurrentText(f'"{proton.replace(" run", "")}" run')
|
||||||
proton_prefix = self.core.lgd.config.get(f"{app_name}.env", "STEAM_COMPAT_DATA_PATH",
|
proton_prefix = self.core.lgd.config.get(f"{app_name}.env", "STEAM_COMPAT_DATA_PATH",
|
||||||
fallback=self.tr(
|
fallback=self.tr(
|
||||||
"Please select path for proton prefix"))
|
"Please select path for proton prefix"))
|
||||||
self.proton_prefix.text_edit.setText(proton_prefix)
|
self.proton_prefix.text_edit.setText(proton_prefix)
|
||||||
self.wrapper_widget.setVisible(False)
|
self.wrapper_widget.setEnabled(False)
|
||||||
else:
|
else:
|
||||||
self.select_proton.setCurrentIndex(0)
|
self.proton_wrapper.setCurrentIndex(0)
|
||||||
self.proton_prefix_widget.setVisible(False)
|
self.proton_prefix.setEnabled(False)
|
||||||
self.wrapper_widget.setVisible(True)
|
self.wrapper_widget.setEnabled(True)
|
||||||
|
|
||||||
if not self.game.supports_cloud_saves:
|
if not self.game.supports_cloud_saves:
|
||||||
self.cloud_sync_widget.setVisible(False)
|
self.cloud_sync.setEnabled(False)
|
||||||
else:
|
else:
|
||||||
self.cloud_sync_widget.setVisible(True)
|
self.cloud_sync.setEnabled(True)
|
||||||
sync_cloud = self.settings.value(f"{self.game.app_name}/auto_sync_cloud", True, bool)
|
sync_cloud = self.settings.value(f"{self.game.app_name}/auto_sync_cloud", True, bool)
|
||||||
self.cloud_sync.setChecked(sync_cloud)
|
self.cloud_sync.setChecked(sync_cloud)
|
||||||
|
|
||||||
|
@ -247,7 +231,7 @@ class LinuxAppSettings(LinuxSettings):
|
||||||
|
|
||||||
def update_game(self, app_name):
|
def update_game(self, app_name):
|
||||||
self.name = app_name
|
self.name = app_name
|
||||||
self.select_path.text_edit.setText(self.core.lgd.config.get(self.name, "wine_prefix", fallback=""))
|
self.wine_prefix.text_edit.setText(self.core.lgd.config.get(self.name, "wine_prefix", fallback=""))
|
||||||
self.select_wine_exec.setText(self.core.lgd.config.get(self.name, "wine_executable", fallback=""))
|
self.wine_exec.text_edit.setText(self.core.lgd.config.get(self.name, "wine_executable", fallback=""))
|
||||||
self.dxvk_widget.name = app_name
|
self.dxvk.name = app_name
|
||||||
self.dxvk_widget.more_settings_widget.name = app_name
|
self.dxvk.more_settings_widget.name = app_name
|
||||||
|
|
|
@ -55,8 +55,7 @@ class ImportWidget(QWidget):
|
||||||
self.app_name_input.setLayout(minilayout)
|
self.app_name_input.setLayout(minilayout)
|
||||||
self.app_name_input.textChanged.connect(self.app_name_changed)
|
self.app_name_input.textChanged.connect(self.app_name_changed)
|
||||||
|
|
||||||
self.path_edit = PathEdit(os.path.expanduser("~"), QFileDialog.DirectoryOnly)
|
self.path_edit = PathEdit(os.path.expanduser("~"), QFileDialog.DirectoryOnly, edit_func=self.path_changed)
|
||||||
self.path_edit.text_edit.textChanged.connect(self.path_changed)
|
|
||||||
self.gb_layout.addWidget(self.path_edit)
|
self.gb_layout.addWidget(self.path_edit)
|
||||||
|
|
||||||
self.gb_layout.addWidget(self.override_app_name_label)
|
self.gb_layout.addWidget(self.override_app_name_label)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QPushButton
|
from PyQt5.QtWidgets import QWidget
|
||||||
|
|
||||||
from rare import __version__
|
from rare import __version__
|
||||||
|
from rare.ui.components.tabs.settings.about import Ui_About
|
||||||
from rare.utils.utils import get_latest_version
|
from rare.utils.utils import get_latest_version
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,45 +14,27 @@ def versiontuple(v):
|
||||||
return tuple((9, 9, 9)) # It is a beta version and newer
|
return tuple((9, 9, 9)) # It is a beta version and newer
|
||||||
|
|
||||||
|
|
||||||
class About(QWidget):
|
class About(QWidget, Ui_About):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(About, self).__init__()
|
super(About, self).__init__()
|
||||||
self.layout = QVBoxLayout()
|
self.setupUi(self)
|
||||||
|
|
||||||
self.title = QLabel("<h2>About</h2>")
|
self.version.setText(__version__)
|
||||||
self.layout.addWidget(self.title)
|
|
||||||
|
self.update_label.setVisible(False)
|
||||||
|
self.update.setVisible(False)
|
||||||
|
self.open_browser.setVisible(False)
|
||||||
|
|
||||||
self.version = QLabel("Version: " + __version__)
|
|
||||||
self.layout.addWidget(self.version)
|
|
||||||
latest_tag = get_latest_version()
|
latest_tag = get_latest_version()
|
||||||
self.update_available = versiontuple(latest_tag) > versiontuple(__version__)
|
self.update_available = versiontuple(latest_tag) > versiontuple(__version__)
|
||||||
if self.update_available:
|
|
||||||
print(f"Update available: {__version__} -> {latest_tag}")
|
self.update.setText("{} -> {}".format(__version__, latest_tag))
|
||||||
self.update_available = QLabel(self.tr("Update available: {} -> {}").format(__version__, latest_tag))
|
|
||||||
self.layout.addWidget(self.update_available)
|
|
||||||
self.open_browser = QPushButton(self.tr("Download latest release"))
|
|
||||||
self.layout.addWidget(self.open_browser)
|
|
||||||
self.open_browser.clicked.connect(
|
self.open_browser.clicked.connect(
|
||||||
lambda: webbrowser.open("https://github.com/Dummerle/Rare/releases/latest"))
|
lambda: webbrowser.open("https://github.com/Dummerle/Rare/releases/latest"))
|
||||||
|
|
||||||
self.dev = QLabel(self.tr("Developer:") + "<a href='https://github.com/Dummerle'>Dummerle</a>")
|
if self.update_available:
|
||||||
self.dev.setToolTip("Github")
|
print(f"Update available: {__version__} -> {latest_tag}")
|
||||||
self.dev.setOpenExternalLinks(True)
|
self.update_label.setVisible(True)
|
||||||
self.dev.setWordWrap(True)
|
self.update.setVisible(True)
|
||||||
self.layout.addWidget(self.dev)
|
self.open_browser.setVisible(True)
|
||||||
self.lgd_dev = QLabel(self.tr("Legendary developer:") + "<a href='https://github.com/derrod/'>derrod</a>")
|
|
||||||
self.lgd_dev.setOpenExternalLinks(True)
|
|
||||||
self.lgd_dev.setToolTip("Github")
|
|
||||||
self.layout.addWidget(self.lgd_dev)
|
|
||||||
self.license = QLabel("License: GNU General Public License v3.0")
|
|
||||||
self.layout.addWidget(self.license)
|
|
||||||
self.info_text = QLabel(
|
|
||||||
self.tr("This is a beta version, so you can get bugs. If you get a bug, please report it by creating a "
|
|
||||||
"Issue on <a href='https://github.com/Dummerle/Rare/issues'>Github</a>. You can also contact me "
|
|
||||||
"on Discord (Dummerle#7419). Or you can join the <a href='https://discord.gg/YvmABK9YSk'>Discord server</a>"))
|
|
||||||
self.info_text.setWordWrap(True)
|
|
||||||
self.info_text.setOpenExternalLinks(True)
|
|
||||||
self.layout.addWidget(self.info_text)
|
|
||||||
|
|
||||||
self.layout.addStretch()
|
|
||||||
self.setLayout(self.layout)
|
|
||||||
|
|
|
@ -1,16 +1,102 @@
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSignal
|
from PyQt5.QtCore import pyqtSignal
|
||||||
from PyQt5.QtWidgets import QWidget, QCheckBox, QVBoxLayout, QWidgetAction, QMenu, QToolButton, QHBoxLayout, QGroupBox
|
from PyQt5.QtWidgets import QGroupBox
|
||||||
|
from PyQt5.QtWidgets import QWidget, QCheckBox, QVBoxLayout, QWidgetAction, QMenu, QToolButton, QHBoxLayout
|
||||||
|
|
||||||
from custom_legendary.core import LegendaryCore
|
from custom_legendary.core import LegendaryCore
|
||||||
|
from rare.ui.components.tabs.settings.dxvk import Ui_DxvkSettings
|
||||||
|
|
||||||
logger = getLogger("DXVK Settings")
|
logger = getLogger("DXVK Settings")
|
||||||
|
|
||||||
|
|
||||||
|
class DxvkSettings(QGroupBox, Ui_DxvkSettings):
|
||||||
|
|
||||||
|
def __init__(self, core: LegendaryCore, name=None):
|
||||||
|
super(DxvkSettings, self).__init__()
|
||||||
|
self.setupUi(self)
|
||||||
|
|
||||||
|
self.name = name if name is not None else "default"
|
||||||
|
self.core = core
|
||||||
|
|
||||||
|
self.dxvk_options_map = {
|
||||||
|
"devinfo": self.devinfo,
|
||||||
|
"fps": self.fps,
|
||||||
|
"frametime": self.frametime,
|
||||||
|
"memory": self.memory,
|
||||||
|
"gpuload": self.gpuload,
|
||||||
|
"version": self.version,
|
||||||
|
"api": self.api,
|
||||||
|
}
|
||||||
|
|
||||||
|
self.load_settings()
|
||||||
|
self.show_dxvk.currentIndexChanged.connect(self.store_settings)
|
||||||
|
for opt in self.dxvk_options_map:
|
||||||
|
self.dxvk_options_map[opt].stateChanged.connect(self.store_settings)
|
||||||
|
|
||||||
|
# Show HUD ComboBox
|
||||||
|
# System Default, index 0, removes DXVK_HUD to use setting from env
|
||||||
|
# Hidden , index 1, adds DXVK_HUD=0 to override system configuration
|
||||||
|
# Visible , index 2, adds DXVK_HUD=1 to override system configuration
|
||||||
|
# Custom Options, index 3, adds DXVK_HUD=devinfo,fps and enables the customization panel
|
||||||
|
|
||||||
|
def load_settings(self):
|
||||||
|
dxvk_options = self.core.lgd.config.get(f"{self.name}.env", "DXVK_HUD", fallback=None)
|
||||||
|
self.gb_dxvk_options.setDisabled(True)
|
||||||
|
if dxvk_options is not None:
|
||||||
|
if dxvk_options == "0":
|
||||||
|
self.show_dxvk.setCurrentIndex(1)
|
||||||
|
elif dxvk_options == "1":
|
||||||
|
self.show_dxvk.setCurrentIndex(2)
|
||||||
|
else:
|
||||||
|
self.show_dxvk.setCurrentIndex(3)
|
||||||
|
self.gb_dxvk_options.setDisabled(False)
|
||||||
|
for opt in dxvk_options.split(","):
|
||||||
|
try:
|
||||||
|
self.dxvk_options_map[opt].setChecked(True)
|
||||||
|
except KeyError:
|
||||||
|
print("Malformed DXVK Option: " + opt)
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
self.show_dxvk.setCurrentIndex(0)
|
||||||
|
|
||||||
|
def store_settings(self):
|
||||||
|
show_dxvk_index = self.show_dxvk.currentIndex()
|
||||||
|
if show_dxvk_index:
|
||||||
|
if f"{self.name}.env" not in self.core.lgd.config.sections():
|
||||||
|
print("add section dxvk")
|
||||||
|
self.core.lgd.config.add_section(f"{self.name}.env")
|
||||||
|
if show_dxvk_index == 1:
|
||||||
|
self.core.lgd.config[f"{self.name}.env"]["DXVK_HUD"] = "0"
|
||||||
|
if show_dxvk_index == 2:
|
||||||
|
self.core.lgd.config[f"{self.name}.env"]["DXVK_HUD"] = "1"
|
||||||
|
if show_dxvk_index == 3:
|
||||||
|
dxvk_options = []
|
||||||
|
for opt in self.dxvk_options_map:
|
||||||
|
if self.dxvk_options_map[opt].isChecked():
|
||||||
|
dxvk_options.append(opt)
|
||||||
|
if not dxvk_options:
|
||||||
|
# Check if this is the first activation
|
||||||
|
stored = self.core.lgd.config.get(f"{self.name}.env", "DXVK_HUD", fallback=None)
|
||||||
|
if stored not in [None, "0", "1"]:
|
||||||
|
self.core.lgd.config[f"{self.name}.env"]["DXVK_HUD"] = "0"
|
||||||
|
else:
|
||||||
|
dxvk_options = ["devinfo", "fps"]
|
||||||
|
# Check again if dxvk_options changed due to first activation
|
||||||
|
if dxvk_options:
|
||||||
|
self.core.lgd.config[f"{self.name}.env"]["DXVK_HUD"] = ",".join(dxvk_options)
|
||||||
|
else:
|
||||||
|
if self.core.lgd.config.get(f"{self.name}.env", "DXVK_HUD", fallback=None) is not None:
|
||||||
|
self.core.lgd.config.remove_option(f"{self.name}.env", "DXVK_HUD")
|
||||||
|
if not self.core.lgd.config[f"{self.name}.env"]:
|
||||||
|
self.core.lgd.config.remove_section(f"{self.name}.env")
|
||||||
|
self.core.lgd.save_config()
|
||||||
|
self.load_settings()
|
||||||
|
|
||||||
|
|
||||||
class DxvkWidget(QGroupBox):
|
class DxvkWidget(QGroupBox):
|
||||||
|
|
||||||
def __init__(self, core: LegendaryCore):
|
def __init__(self, core: LegendaryCore, name=None):
|
||||||
super(DxvkWidget, self).__init__()
|
super(DxvkWidget, self).__init__()
|
||||||
self.core = core
|
self.core = core
|
||||||
self.setObjectName("settings_widget")
|
self.setObjectName("settings_widget")
|
||||||
|
@ -23,7 +109,7 @@ class DxvkWidget(QGroupBox):
|
||||||
"api": [False, self.tr("D3D Level of application")],
|
"api": [False, self.tr("D3D Level of application")],
|
||||||
"frametime": [False, self.tr("Frame time graph")]
|
"frametime": [False, self.tr("Frame time graph")]
|
||||||
}
|
}
|
||||||
self.name = "default"
|
self.name = name
|
||||||
self.layout = QVBoxLayout()
|
self.layout = QVBoxLayout()
|
||||||
self.child_layout = QHBoxLayout()
|
self.child_layout = QHBoxLayout()
|
||||||
self.setTitle(self.tr("dxvk settings"))
|
self.setTitle(self.tr("dxvk settings"))
|
||||||
|
|
|
@ -1,71 +1,47 @@
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtWidgets import QFileDialog, QMessageBox, QWidget
|
||||||
from PyQt5.QtGui import QIntValidator
|
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QFileDialog, QPushButton, QLineEdit, QGroupBox, QMessageBox, \
|
|
||||||
QScrollArea
|
|
||||||
|
|
||||||
from custom_legendary.core import LegendaryCore
|
from custom_legendary.core import LegendaryCore
|
||||||
from rare.components.tabs.settings.settings_widget import SettingsWidget
|
from rare.ui.components.tabs.settings.legendary import Ui_LegendarySettings
|
||||||
from rare.utils.extra_widgets import PathEdit
|
from rare.utils.extra_widgets import PathEdit
|
||||||
from rare.utils.utils import get_size
|
from rare.utils.utils import get_size
|
||||||
|
|
||||||
logger = getLogger("LegendarySettings")
|
logger = getLogger("LegendarySettings")
|
||||||
|
|
||||||
|
|
||||||
class LegendarySettings(QScrollArea):
|
class LegendarySettings(QWidget, Ui_LegendarySettings):
|
||||||
def __init__(self, core: LegendaryCore):
|
def __init__(self, core: LegendaryCore):
|
||||||
super(LegendarySettings, self).__init__()
|
super(LegendarySettings, self).__init__()
|
||||||
self.widget = QGroupBox(self.tr("Legendary settings"))
|
self.setupUi(self)
|
||||||
self.setWidgetResizable(True)
|
|
||||||
self.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
|
|
||||||
self.layout = QVBoxLayout()
|
|
||||||
self.core = core
|
self.core = core
|
||||||
|
|
||||||
self.widget.setObjectName("group")
|
|
||||||
# Default installation directory
|
# Default installation directory
|
||||||
self.select_path = PathEdit(core.get_default_install_dir(), type_of_file=QFileDialog.DirectoryOnly,
|
self.install_dir = PathEdit(core.get_default_install_dir(),
|
||||||
infotext="Default")
|
file_type=QFileDialog.DirectoryOnly,
|
||||||
self.select_path.text_edit.textChanged.connect(lambda t: self.save_path_button.setDisabled(False))
|
save_func=self.save_path)
|
||||||
self.save_path_button = QPushButton("Save")
|
self.layout_install_dir.addWidget(self.install_dir)
|
||||||
self.save_path_button.clicked.connect(self.save_path)
|
|
||||||
self.install_dir_widget = SettingsWidget(self.tr("Default installation directory"), self.select_path,
|
|
||||||
self.save_path_button)
|
|
||||||
self.layout.addWidget(self.install_dir_widget)
|
|
||||||
|
|
||||||
# Max Workers
|
# Max Workers
|
||||||
self.max_worker_select = QLineEdit(self.core.lgd.config["Legendary"].get("max_workers"))
|
max_workers = self.core.lgd.config["Legendary"].get("max_workers", fallback=0)
|
||||||
self.max_worker_select.setValidator(QIntValidator())
|
self.max_worker_select.setValue(int(max_workers))
|
||||||
self.max_worker_select.setPlaceholderText("Default")
|
self.max_worker_select.valueChanged.connect(self.max_worker_save)
|
||||||
self.max_worker_select.textChanged.connect(self.max_worker_save)
|
|
||||||
self.max_worker_widget = SettingsWidget(self.tr("Max workers for Download (Less: slower download)(0: Default)"),
|
|
||||||
self.max_worker_select)
|
|
||||||
self.layout.addWidget(self.max_worker_widget)
|
|
||||||
|
|
||||||
# cleanup
|
# Cleanup
|
||||||
self.clean_layout = QVBoxLayout()
|
self.clean_button.clicked.connect(
|
||||||
self.cleanup_widget = QGroupBox(self.tr("Cleanup"))
|
lambda: self.cleanup(False)
|
||||||
self.clean_button = QPushButton(self.tr("Remove everything"))
|
)
|
||||||
self.clean_button.clicked.connect(lambda: self.cleanup(False))
|
self.clean_button_without_manifests.clicked.connect(
|
||||||
self.clean_layout.addWidget(self.clean_button)
|
lambda: self.cleanup(True)
|
||||||
|
)
|
||||||
self.clean_button_without_manifests = QPushButton(self.tr("Clean, but keep manifests"))
|
|
||||||
self.clean_button_without_manifests.clicked.connect(lambda: self.cleanup(True))
|
|
||||||
self.clean_layout.addWidget(self.clean_button_without_manifests)
|
|
||||||
|
|
||||||
self.cleanup_widget.setLayout(self.clean_layout)
|
|
||||||
self.layout.addWidget(self.cleanup_widget)
|
|
||||||
|
|
||||||
self.layout.addStretch(1)
|
|
||||||
self.widget.setLayout(self.layout)
|
|
||||||
self.setWidget(self.widget)
|
|
||||||
|
|
||||||
def save_path(self):
|
def save_path(self):
|
||||||
self.core.lgd.config["Legendary"]["install_dir"] = self.select_path.text()
|
self.core.lgd.config["Legendary"]["install_dir"] = self.install_dir.text()
|
||||||
if self.select_path.text() == "" and "install_dir" in self.core.lgd.config["Legendary"].keys():
|
if self.install_dir.text() == "" and "install_dir" in self.core.lgd.config["Legendary"].keys():
|
||||||
self.core.lgd.config["Legendary"].pop("install_dir")
|
self.core.lgd.config["Legendary"].pop("install_dir")
|
||||||
else:
|
else:
|
||||||
logger.info("Set config install_dir to " + self.select_path.text())
|
logger.info("Set config install_dir to " + self.install_dir.text())
|
||||||
self.core.lgd.save_config()
|
self.core.lgd.save_config()
|
||||||
|
|
||||||
def max_worker_save(self, num_workers: str):
|
def max_worker_save(self, num_workers: str):
|
||||||
|
|
|
@ -1,55 +1,50 @@
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QPushButton, QFileDialog, QLineEdit, QGroupBox
|
from PyQt5.QtWidgets import QFileDialog, QWidget
|
||||||
|
|
||||||
from custom_legendary.core import LegendaryCore
|
from custom_legendary.core import LegendaryCore
|
||||||
from rare.components.tabs.settings.dxvk import DxvkWidget
|
from rare.components.tabs.settings.dxvk import DxvkSettings, DxvkWidget
|
||||||
from rare.components.tabs.settings.settings_widget import SettingsWidget
|
from rare.ui.components.tabs.settings.linux import Ui_LinuxSettings
|
||||||
from rare.utils.extra_widgets import PathEdit
|
from rare.utils.extra_widgets import PathEdit
|
||||||
|
|
||||||
logger = getLogger("LinuxSettings")
|
logger = getLogger("LinuxSettings")
|
||||||
|
|
||||||
|
|
||||||
class LinuxSettings(QGroupBox):
|
class LinuxSettings(QWidget, Ui_LinuxSettings):
|
||||||
def __init__(self, core: LegendaryCore, name="default"):
|
def __init__(self, core: LegendaryCore, name=None):
|
||||||
super(LinuxSettings, self).__init__()
|
super(LinuxSettings, self).__init__()
|
||||||
self.layout = QVBoxLayout()
|
self.setupUi(self)
|
||||||
self.name = name
|
|
||||||
|
self.name = name if name is not None else "default"
|
||||||
self.core = core
|
self.core = core
|
||||||
self.setTitle(self.tr("Linux settings"))
|
|
||||||
self.setObjectName("group")
|
# Wine prefix
|
||||||
# Wineprefix
|
self.wine_prefix = PathEdit(self.core.lgd.config.get(self.name, "wine_prefix", fallback=""),
|
||||||
self.select_path = PathEdit(self.core.lgd.config.get(self.name, "wine_prefix", fallback=""),
|
file_type=QFileDialog.DirectoryOnly,
|
||||||
type_of_file=QFileDialog.DirectoryOnly,
|
save_func=lambda: self.save_setting(self.wine_prefix, "wine_prefix"))
|
||||||
infotext="Default")
|
self.prefix_layout.addWidget(self.wine_prefix)
|
||||||
self.select_path.text_edit.textChanged.connect(lambda t: self.save_path_button.setDisabled(False))
|
|
||||||
self.save_path_button = QPushButton("Save")
|
|
||||||
self.save_path_button.clicked.connect(lambda: self.save_setting(self.select_path, "wine_prefix"))
|
|
||||||
self.install_dir_widget = SettingsWidget(self.tr("Default Wine Prefix"), self.select_path,
|
|
||||||
self.save_path_button)
|
|
||||||
self.layout.addWidget(self.install_dir_widget)
|
|
||||||
|
|
||||||
# Wine executable
|
# Wine executable
|
||||||
self.select_wine_exec = QLineEdit(self.core.lgd.config.get(self.name, "wine_executable", fallback=""))
|
self.wine_exec = PathEdit(self.core.lgd.config.get(self.name, "wine_executable", fallback=""),
|
||||||
self.save_wine_exec = QPushButton("Save")
|
file_type=QFileDialog.ExistingFile,
|
||||||
self.save_wine_exec.clicked.connect(lambda: self.save_setting(self.select_wine_exec, "wine_executable"))
|
name_filter="Wine executable (wine wine64)",
|
||||||
self.install_dir_widget = SettingsWidget(self.tr("Default Wine executable"), self.select_wine_exec,
|
save_func=lambda: self.save_setting(self.wine_exec, "wine_executable"))
|
||||||
self.save_wine_exec)
|
self.exec_layout.addWidget(self.wine_exec)
|
||||||
self.layout.addWidget(self.install_dir_widget)
|
|
||||||
|
|
||||||
# dxvk
|
# dxvk
|
||||||
self.dxvk_widget = DxvkWidget(core)
|
# FIXME: Remove this check when done with per game settings
|
||||||
self.layout.addWidget(self.dxvk_widget)
|
if name is None:
|
||||||
if name == "default":
|
self.dxvk = DxvkSettings(core, self.name)
|
||||||
self.layout.addStretch(1)
|
else:
|
||||||
self.setLayout(self.layout)
|
self.dxvk = DxvkWidget(core)
|
||||||
|
self.dxvk_layout.addWidget(self.dxvk)
|
||||||
|
|
||||||
def save_setting(self, widget: QLineEdit, setting_name: str):
|
def save_setting(self, widget: PathEdit, setting_name: str):
|
||||||
if not self.name in self.core.lgd.config.sections():
|
if self.name not in self.core.lgd.config.sections():
|
||||||
self.core.lgd.config.add_section(self.name)
|
self.core.lgd.config.add_section(self.name)
|
||||||
|
|
||||||
self.core.lgd.config.set(self.name, setting_name, widget.text())
|
self.core.lgd.config.set(self.name, setting_name, widget.text())
|
||||||
if widget.text() == "":
|
if not widget.text():
|
||||||
self.core.lgd.config.remove_option(self.name, setting_name)
|
self.core.lgd.config.remove_option(self.name, setting_name)
|
||||||
else:
|
else:
|
||||||
logger.info("Set config of wine_prefix to " + widget.text())
|
logger.info("Set config of wine_prefix to " + widget.text())
|
||||||
|
|
|
@ -4,13 +4,13 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from PyQt5.QtCore import QSettings, Qt
|
from PyQt5.QtCore import QSettings
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QFileDialog, QComboBox, QPushButton, QCheckBox, QGroupBox, QScrollArea
|
from PyQt5.QtWidgets import QFileDialog, QWidget
|
||||||
|
|
||||||
from rare.components.tabs.settings.rpc_settings import RPCSettings
|
from rare.components.tabs.settings.rpc_settings import RPCSettings
|
||||||
from rare.components.tabs.settings.settings_widget import SettingsWidget
|
from rare.ui.components.tabs.settings.rare import Ui_RareSettings
|
||||||
from rare.utils.extra_widgets import PathEdit
|
from rare.utils.extra_widgets import PathEdit
|
||||||
from rare.utils.utils import get_lang, get_possible_langs
|
from rare.utils.utils import get_lang, get_possible_langs, get_color_schemes, get_style_sheets
|
||||||
|
|
||||||
logger = getLogger("RareSettings")
|
logger = getLogger("RareSettings")
|
||||||
|
|
||||||
|
@ -21,89 +21,130 @@ languages = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class RareSettings(QScrollArea):
|
class RareSettings(QWidget, Ui_RareSettings):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(RareSettings, self).__init__()
|
super(RareSettings, self).__init__()
|
||||||
self.widget = QGroupBox(self.tr("Rare settings"))
|
self.setupUi(self)
|
||||||
self.widget.setObjectName("group")
|
|
||||||
self.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
|
# (widget_name, option_name, default)
|
||||||
self.setWidgetResizable(True)
|
|
||||||
# (option_name, group_text, checkbox_text, default
|
|
||||||
self.checkboxes = [
|
self.checkboxes = [
|
||||||
("sys_tray", self.tr("Hide to System Tray Icon"), self.tr("Exit to System Tray Icon"), True),
|
(self.sys_tray, "sys_tray", True),
|
||||||
("auto_update", self.tr("Automatically update Games on startup"), self.tr("Auto updates"),
|
(self.auto_update, "auto_update", False),
|
||||||
False),
|
(self.confirm_start, "confirm_start", False),
|
||||||
("confirm_start", self.tr("Confirm launch of game"), self.tr("Confirm launch of game"),
|
(self.auto_sync_cloud, "auto_sync_cloud", True),
|
||||||
False),
|
(self.notification, "notification", True),
|
||||||
("auto_sync_cloud", self.tr("Auto sync with cloud"), self.tr("Sync with cloud"), True),
|
(self.save_size, "save_size", False)
|
||||||
("notification", self.tr("Show Notifications after Downloads"), self.tr("Show notification"),
|
|
||||||
True),
|
|
||||||
("save_size", self.tr("Save size of window after restart"), self.tr("Save size"), False)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
self.layout = QVBoxLayout()
|
|
||||||
self.settings = QSettings()
|
self.settings = QSettings()
|
||||||
img_dir = self.settings.value("img_dir", os.path.expanduser("~/.cache/rare/images/"), type=str)
|
self.img_dir_path = self.settings.value("img_dir", os.path.expanduser("~/.cache/rare/images/"), type=str)
|
||||||
language = self.settings.value("language", get_lang(), type=str)
|
language = self.settings.value("language", get_lang(), type=str)
|
||||||
# select Image dir
|
self.logdir = os.path.expanduser("~/.cache/rare/logs")
|
||||||
self.select_path = PathEdit(img_dir, type_of_file=QFileDialog.DirectoryOnly)
|
|
||||||
self.select_path.text_edit.textChanged.connect(lambda t: self.save_path_button.setDisabled(False))
|
# Select Image directory
|
||||||
self.save_path_button = QPushButton(self.tr("Save"))
|
self.img_dir = PathEdit(self.img_dir_path, file_type=QFileDialog.DirectoryOnly, save_func=self.save_path)
|
||||||
self.save_path_button.clicked.connect(self.save_path)
|
self.img_dir_layout.addWidget(self.img_dir)
|
||||||
self.img_dir = SettingsWidget(self.tr("Image Directory"), self.select_path, self.save_path_button)
|
|
||||||
self.layout.addWidget(self.img_dir)
|
|
||||||
|
|
||||||
# Select lang
|
# Select lang
|
||||||
self.select_lang = QComboBox()
|
self.lang_select.addItems([i[1] for i in languages])
|
||||||
self.select_lang.addItems([i[1] for i in languages])
|
|
||||||
if language in get_possible_langs():
|
if language in get_possible_langs():
|
||||||
index = [lang[0] for lang in languages].index(language)
|
index = [lang[0] for lang in languages].index(language)
|
||||||
self.select_lang.setCurrentIndex(index)
|
self.lang_select.setCurrentIndex(index)
|
||||||
else:
|
else:
|
||||||
self.select_lang.setCurrentIndex(0)
|
self.lang_select.setCurrentIndex(0)
|
||||||
self.lang_widget = SettingsWidget(self.tr("Language"), self.select_lang)
|
self.lang_select.currentIndexChanged.connect(self.update_lang)
|
||||||
self.select_lang.currentIndexChanged.connect(self.update_lang)
|
|
||||||
self.layout.addWidget(self.lang_widget)
|
colors = get_color_schemes()
|
||||||
|
self.color_select.addItems(colors)
|
||||||
|
if (color := self.settings.value("color_scheme")) in colors:
|
||||||
|
self.color_select.setCurrentIndex(self.color_select.findText(color))
|
||||||
|
self.color_select.setDisabled(False)
|
||||||
|
self.style_select.setDisabled(True)
|
||||||
|
else:
|
||||||
|
self.color_select.setCurrentIndex(0)
|
||||||
|
self.color_select.currentIndexChanged.connect(self.on_color_select_changed)
|
||||||
|
|
||||||
|
styles = get_style_sheets()
|
||||||
|
self.style_select.addItems(styles)
|
||||||
|
if (style := self.settings.value("style_sheet")) in styles:
|
||||||
|
self.style_select.setCurrentIndex(self.style_select.findText(style))
|
||||||
|
self.style_select.setDisabled(False)
|
||||||
|
self.color_select.setDisabled(True)
|
||||||
|
else:
|
||||||
|
self.style_select.setCurrentIndex(0)
|
||||||
|
self.style_select.currentIndexChanged.connect(self.on_style_select_changed)
|
||||||
|
|
||||||
|
self.interface_info.setVisible(False)
|
||||||
|
|
||||||
self.rpc = RPCSettings()
|
self.rpc = RPCSettings()
|
||||||
self.layout.addWidget(self.rpc)
|
self.rpc_layout.addWidget(self.rpc)
|
||||||
|
|
||||||
for option, head_text, text, default in self.checkboxes:
|
self.init_checkboxes(self.checkboxes)
|
||||||
checkbox = SettingsCheckbox(option, text, default)
|
self.sys_tray.stateChanged.connect(
|
||||||
settings_widget = SettingsWidget(head_text, checkbox)
|
lambda: self.settings.setValue("sys_tray", self.sys_tray.isChecked())
|
||||||
self.layout.addWidget(settings_widget)
|
)
|
||||||
|
self.auto_update.stateChanged.connect(
|
||||||
|
lambda: self.settings.setValue("auto_update", self.auto_update.isChecked())
|
||||||
|
)
|
||||||
|
self.confirm_start.stateChanged.connect(
|
||||||
|
lambda: self.settings.setValue("confirm_start", self.confirm_start.isChecked())
|
||||||
|
)
|
||||||
|
self.auto_sync_cloud.stateChanged.connect(
|
||||||
|
lambda: self.settings.setValue("auto_sync_cloud", self.auto_sync_cloud.isChecked())
|
||||||
|
)
|
||||||
|
self.notification.stateChanged.connect(
|
||||||
|
lambda: self.settings.setValue("notification", self.notification.isChecked())
|
||||||
|
)
|
||||||
|
self.save_size.stateChanged.connect(
|
||||||
|
lambda: self.settings.setValue("save_size", self.save_size.isChecked())
|
||||||
|
)
|
||||||
|
|
||||||
self.open_log_dir = QPushButton(self.tr("Open Log directory"))
|
self.log_dir_open_button.clicked.connect(self.open_dir)
|
||||||
self.layout.addWidget(self.open_log_dir)
|
# TODO: Implement
|
||||||
self.open_log_dir.clicked.connect(self.open_dir)
|
self.log_dir_clean_button.setVisible(False)
|
||||||
|
self.log_dir_size_label.setVisible(False)
|
||||||
|
|
||||||
self.layout.addStretch()
|
def on_color_select_changed(self, color):
|
||||||
self.widget.setLayout(self.layout)
|
if color:
|
||||||
self.setWidget(self.widget)
|
self.style_select.setCurrentIndex(0)
|
||||||
|
self.style_select.setDisabled(True)
|
||||||
|
self.settings.setValue("color_scheme", self.color_select.currentText())
|
||||||
|
else:
|
||||||
|
self.settings.remove("color_scheme")
|
||||||
|
self.style_select.setDisabled(False)
|
||||||
|
self.interface_info.setVisible(True)
|
||||||
|
|
||||||
|
def on_style_select_changed(self, style):
|
||||||
|
if style:
|
||||||
|
self.color_select.setCurrentIndex(0)
|
||||||
|
self.color_select.setDisabled(True)
|
||||||
|
self.settings.setValue("style_sheet", self.style_select.currentText())
|
||||||
|
else:
|
||||||
|
self.settings.remove("style_sheet")
|
||||||
|
self.color_select.setDisabled(False)
|
||||||
|
self.interface_info.setVisible(True)
|
||||||
|
|
||||||
def open_dir(self):
|
def open_dir(self):
|
||||||
logdir = os.path.expanduser("~/.cache/rare/logs")
|
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
os.startfile(logdir)
|
os.startfile(self.logdir)
|
||||||
else:
|
else:
|
||||||
opener = "open" if sys.platform == "darwin" else "xdg-open"
|
opener = "open" if sys.platform == "darwin" else "xdg-open"
|
||||||
subprocess.Popen([opener, logdir])
|
subprocess.Popen([opener, self.logdir])
|
||||||
|
|
||||||
def save_window_size(self):
|
def save_window_size(self):
|
||||||
self.settings.setValue("save_size", self.save_size.isChecked())
|
self.settings.setValue("save_size", self.save_size.isChecked())
|
||||||
self.settings.remove("window_size")
|
self.settings.remove("window_size")
|
||||||
|
|
||||||
def save_path(self):
|
def save_path(self):
|
||||||
self.save_path_button.setDisabled(True)
|
|
||||||
self.update_path()
|
self.update_path()
|
||||||
|
|
||||||
def update_lang(self, i: int):
|
def update_lang(self, i: int):
|
||||||
self.settings.setValue("language", languages[i][0])
|
self.settings.setValue("language", languages[i][0])
|
||||||
self.lang_widget.info_text.setText(self.tr("Restart Application to activate changes"))
|
self.interface_info.setVisible(True)
|
||||||
|
|
||||||
def update_path(self):
|
def update_path(self):
|
||||||
old_path = self.settings.value("img_dir", type=str)
|
old_path = self.img_dir_path
|
||||||
new_path = self.select_path.text()
|
new_path = self.img_dir.text()
|
||||||
|
|
||||||
if old_path != new_path:
|
if old_path != new_path:
|
||||||
if not os.path.exists(new_path):
|
if not os.path.exists(new_path):
|
||||||
|
@ -115,13 +156,10 @@ class RareSettings(QScrollArea):
|
||||||
for i in os.listdir(old_path):
|
for i in os.listdir(old_path):
|
||||||
shutil.move(os.path.join(old_path, i), os.path.join(new_path, i))
|
shutil.move(os.path.join(old_path, i), os.path.join(new_path, i))
|
||||||
os.rmdir(old_path)
|
os.rmdir(old_path)
|
||||||
|
self.img_dir_path = new_path
|
||||||
self.settings.setValue("img_dir", new_path)
|
self.settings.setValue("img_dir", new_path)
|
||||||
|
|
||||||
|
def init_checkboxes(self, checkboxes):
|
||||||
class SettingsCheckbox(QCheckBox):
|
for cb in checkboxes:
|
||||||
def __init__(self, option, text, default):
|
widget, option, default = cb
|
||||||
super(SettingsCheckbox, self).__init__(text)
|
widget.setChecked(self.settings.value(option, default, bool))
|
||||||
self.option = option
|
|
||||||
self.settings = QSettings()
|
|
||||||
self.setChecked(self.settings.value(option, default, bool))
|
|
||||||
self.stateChanged.connect(lambda: self.settings.setValue(option, self.isChecked()))
|
|
||||||
|
|
|
@ -1,40 +1,35 @@
|
||||||
from PyQt5.QtCore import QSettings, pyqtSignal
|
from PyQt5.QtCore import QSettings, pyqtSignal
|
||||||
from PyQt5.QtWidgets import QGroupBox, QCheckBox, QVBoxLayout, QComboBox
|
from PyQt5.QtWidgets import QGroupBox
|
||||||
|
|
||||||
|
from rare.ui.components.tabs.settings.rpc_settings import Ui_RPCSettings
|
||||||
|
|
||||||
|
|
||||||
class RPCSettings(QGroupBox):
|
class RPCSettings(QGroupBox, Ui_RPCSettings):
|
||||||
update_settings = pyqtSignal()
|
update_settings = pyqtSignal()
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(RPCSettings, self).__init__()
|
super(RPCSettings, self).__init__()
|
||||||
self.setTitle(self.tr("Discord RPC"))
|
self.setupUi(self)
|
||||||
self.setObjectName("settings_widget")
|
|
||||||
self.settings = QSettings()
|
self.settings = QSettings()
|
||||||
self.layout = QVBoxLayout()
|
|
||||||
|
|
||||||
self.enable = QComboBox()
|
|
||||||
self.enable_states = [self.tr("Show when playing"), self.tr("Show always"), self.tr("Show never")]
|
|
||||||
self.enable.addItems(self.enable_states)
|
|
||||||
self.enable.setCurrentIndex(self.settings.value("rpc_enable", 0, int))
|
self.enable.setCurrentIndex(self.settings.value("rpc_enable", 0, int))
|
||||||
self.layout.addWidget(self.enable)
|
|
||||||
self.enable.currentIndexChanged.connect(self.changed)
|
self.enable.currentIndexChanged.connect(self.changed)
|
||||||
|
|
||||||
self.show_game = QCheckBox(self.tr("Show Game"))
|
|
||||||
self.show_game.setChecked((self.settings.value("rpc_name", True, bool)))
|
self.show_game.setChecked((self.settings.value("rpc_name", True, bool)))
|
||||||
self.layout.addWidget(self.show_game)
|
self.show_game.stateChanged.connect(
|
||||||
self.show_game.stateChanged.connect(lambda: self.settings.setValue("rpc_game", self.show_game.isChecked()))
|
lambda: self.settings.setValue("rpc_game", self.show_game.isChecked())
|
||||||
|
)
|
||||||
|
|
||||||
self.show_os = QCheckBox(self.tr("Show OS"))
|
|
||||||
self.layout.addWidget(self.show_os)
|
|
||||||
self.show_os.setChecked((self.settings.value("rpc_os", True, bool)))
|
self.show_os.setChecked((self.settings.value("rpc_os", True, bool)))
|
||||||
self.show_os.stateChanged.connect(lambda: self.settings.setValue("rpc_os", self.show_os.isChecked()))
|
self.show_os.stateChanged.connect(
|
||||||
|
lambda: self.settings.setValue("rpc_os", self.show_os.isChecked())
|
||||||
|
)
|
||||||
|
|
||||||
self.show_time = QCheckBox(self.tr("Show Time playing"))
|
|
||||||
self.layout.addWidget(self.show_time)
|
|
||||||
self.show_time.setChecked((self.settings.value("rpc_time", True, bool)))
|
self.show_time.setChecked((self.settings.value("rpc_time", True, bool)))
|
||||||
self.show_time.stateChanged.connect(lambda: self.settings.setValue("rpc_time", self.show_time.isChecked()))
|
self.show_time.stateChanged.connect(
|
||||||
|
lambda: self.settings.setValue("rpc_time", self.show_time.isChecked())
|
||||||
self.setLayout(self.layout)
|
)
|
||||||
|
|
||||||
def changed(self, i):
|
def changed(self, i):
|
||||||
self.settings.setValue("rpc_enable", i)
|
self.settings.setValue("rpc_enable", i)
|
||||||
|
|
|
@ -1,153 +0,0 @@
|
||||||
QWidget {
|
|
||||||
background-color: #202225;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
QLabel {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar#main_tab_bar {
|
|
||||||
border-bottom: none;
|
|
||||||
background-color: #2b2b2c;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab#main_tab_bar {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab#main_tab_bar {
|
|
||||||
border-bottom: none;
|
|
||||||
padding: 5px
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab:selected#main_tab_bar {
|
|
||||||
background-color: gray;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab:hover#main_tab_bar {
|
|
||||||
border-bottom: 2px solid black;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QGroupBox {
|
|
||||||
padding: 4px;
|
|
||||||
margin: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
QGroupBox#settings_widget {
|
|
||||||
border: 1px solid gray;
|
|
||||||
font-size: 13px;
|
|
||||||
border-radius: 3px;
|
|
||||||
margin-top: 1ex;
|
|
||||||
padding-top: 4px;
|
|
||||||
padding-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
QGroupBox#game_widget_icon {
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
QGroupBox#group {
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
border: 1px solid white;
|
|
||||||
margin-top: 10px;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QToolButton {
|
|
||||||
padding: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QPushButton {
|
|
||||||
border: 1px solid white;
|
|
||||||
border-radius: 4px;
|
|
||||||
background-color: #3c3f41;
|
|
||||||
padding: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPushButton:hover {
|
|
||||||
background-color: #223;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 {
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPushButton:hover#menu_button {
|
|
||||||
background-color: #334;
|
|
||||||
}
|
|
||||||
|
|
||||||
QLineEdit {
|
|
||||||
border: 1px solid white;
|
|
||||||
}
|
|
||||||
|
|
||||||
QCheckBox {
|
|
||||||
color: #F0F0F0;
|
|
||||||
background-color: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
QCheckBox::indicator {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#list_widget {
|
|
||||||
border-top: 2px solid white;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPushButton:hover#installed_menu_button {
|
|
||||||
background-color: green;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab#settings_bar {
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab:hover#settings_bar {
|
|
||||||
border-left: 2px solid white;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab::selected#settings_bar {
|
|
||||||
background-color: darkslategrey;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search_bar {
|
|
||||||
padding: 3px;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #334;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTabBar::tab:disabled#settings_bar {
|
|
||||||
color: transparent;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
QScrollBar:vertical{
|
|
||||||
border: 1px solid white;
|
|
||||||
}
|
|
||||||
QScrollBar::handle:vertical{
|
|
||||||
background-color: gray;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
*/
|
|
61
rare/styles/colors/Numix-Dark.scheme
Normal file
61
rare/styles/colors/Numix-Dark.scheme
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
[ColorScheme]
|
||||||
|
Active\AlternateBase=#2f2f2f
|
||||||
|
Active\Base=#333333
|
||||||
|
Active\BrightText=#ffffff
|
||||||
|
Active\Button=#525252
|
||||||
|
Active\ButtonText=#dddddd
|
||||||
|
Active\Dark=#333333
|
||||||
|
Active\Highlight=#f0544c
|
||||||
|
Active\HighlightedText=#ffffff
|
||||||
|
Active\Light=#555555
|
||||||
|
Active\Link=#fc6f5d
|
||||||
|
Active\LinkVisited=#853931
|
||||||
|
Active\Mid=#a0a0a4
|
||||||
|
Active\Midlight=#e9e7e3
|
||||||
|
Active\PlaceholderText=#eeeeee
|
||||||
|
Active\Shadow=#343434
|
||||||
|
Active\Text=#eeeeee
|
||||||
|
Active\ToolTipBase=#444444
|
||||||
|
Active\ToolTipText=#eeeeee
|
||||||
|
Active\Window=#444444
|
||||||
|
Active\WindowText=#dddddd
|
||||||
|
Disabled\AlternateBase=#2f2f2f
|
||||||
|
Disabled\Base=#333333
|
||||||
|
Disabled\BrightText=#ffffff
|
||||||
|
Disabled\Button=#525252
|
||||||
|
Disabled\ButtonText=#808080
|
||||||
|
Disabled\Dark=#333333
|
||||||
|
Disabled\Highlight=#f0544c
|
||||||
|
Disabled\HighlightedText=#808080
|
||||||
|
Disabled\Light=#555555
|
||||||
|
Disabled\Link=#fc6f5d
|
||||||
|
Disabled\LinkVisited=#853931
|
||||||
|
Disabled\Mid=#a0a0a4
|
||||||
|
Disabled\Midlight=#e9e7e3
|
||||||
|
Disabled\PlaceholderText=#eeeeee
|
||||||
|
Disabled\Shadow=#343434
|
||||||
|
Disabled\Text=#808080
|
||||||
|
Disabled\ToolTipBase=#444444
|
||||||
|
Disabled\ToolTipText=#eeeeee
|
||||||
|
Disabled\Window=#444444
|
||||||
|
Disabled\WindowText=#808080
|
||||||
|
Inactive\AlternateBase=#2f2f2f
|
||||||
|
Inactive\Base=#333333
|
||||||
|
Inactive\BrightText=#ffffff
|
||||||
|
Inactive\Button=#525252
|
||||||
|
Inactive\ButtonText=#dddddd
|
||||||
|
Inactive\Dark=#333333
|
||||||
|
Inactive\Highlight=#f0544c
|
||||||
|
Inactive\HighlightedText=#ffffff
|
||||||
|
Inactive\Light=#555555
|
||||||
|
Inactive\Link=#fc6f5d
|
||||||
|
Inactive\LinkVisited=#853931
|
||||||
|
Inactive\Mid=#a0a0a4
|
||||||
|
Inactive\Midlight=#e9e7e3
|
||||||
|
Inactive\PlaceholderText=#eeeeee
|
||||||
|
Inactive\Shadow=#343434
|
||||||
|
Inactive\Text=#eeeeee
|
||||||
|
Inactive\ToolTipBase=#444444
|
||||||
|
Inactive\ToolTipText=#eeeeee
|
||||||
|
Inactive\Window=#444444
|
||||||
|
Inactive\WindowText=#dddddd
|
61
rare/styles/colors/Rare.scheme
Normal file
61
rare/styles/colors/Rare.scheme
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
[ColorScheme]
|
||||||
|
Active\AlternateBase=#f7f7f7
|
||||||
|
Active\Base=#333344
|
||||||
|
Active\BrightText=#ffffff
|
||||||
|
Active\Button=#3c3f41
|
||||||
|
Active\ButtonText=#eeeeee
|
||||||
|
Active\Dark=#9f0910
|
||||||
|
Active\Highlight=#2f4f4f
|
||||||
|
Active\HighlightedText=#eeeeee
|
||||||
|
Active\Light=#ffffff
|
||||||
|
Active\Link=#0000ff
|
||||||
|
Active\LinkVisited=#ff00ff
|
||||||
|
Active\Mid=#b80e35
|
||||||
|
Active\Midlight=#ca0651
|
||||||
|
Active\PlaceholderText=#eeeeee
|
||||||
|
Active\Shadow=#767676
|
||||||
|
Active\Text=#eeeeee
|
||||||
|
Active\ToolTipBase=#ffffdc
|
||||||
|
Active\ToolTipText=#eeeeee
|
||||||
|
Active\Window=#202225
|
||||||
|
Active\WindowText=#eeeeee
|
||||||
|
Disabled\AlternateBase=#f7f7f7
|
||||||
|
Disabled\Base=#333344
|
||||||
|
Disabled\BrightText=#ffffff
|
||||||
|
Disabled\Button=#3c3f41
|
||||||
|
Disabled\ButtonText=#808080
|
||||||
|
Disabled\Dark=#9f0910
|
||||||
|
Disabled\Highlight=#2f4f4f
|
||||||
|
Disabled\HighlightedText=#808080
|
||||||
|
Disabled\Light=#ffffff
|
||||||
|
Disabled\Link=#0000ff
|
||||||
|
Disabled\LinkVisited=#ff00ff
|
||||||
|
Disabled\Mid=#b80e35
|
||||||
|
Disabled\Midlight=#ca0651
|
||||||
|
Disabled\PlaceholderText=#eeeeee
|
||||||
|
Disabled\Shadow=#767676
|
||||||
|
Disabled\Text=#808080
|
||||||
|
Disabled\ToolTipBase=#ffffdc
|
||||||
|
Disabled\ToolTipText=#eeeeee
|
||||||
|
Disabled\Window=#202225
|
||||||
|
Disabled\WindowText=#808080
|
||||||
|
Inactive\AlternateBase=#f7f7f7
|
||||||
|
Inactive\Base=#333344
|
||||||
|
Inactive\BrightText=#ffffff
|
||||||
|
Inactive\Button=#3c3f41
|
||||||
|
Inactive\ButtonText=#eeeeee
|
||||||
|
Inactive\Dark=#9f0910
|
||||||
|
Inactive\Highlight=#2f4f4f
|
||||||
|
Inactive\HighlightedText=#eeeeee
|
||||||
|
Inactive\Light=#ffffff
|
||||||
|
Inactive\Link=#0000ff
|
||||||
|
Inactive\LinkVisited=#ff00ff
|
||||||
|
Inactive\Mid=#b80e35
|
||||||
|
Inactive\Midlight=#ca0651
|
||||||
|
Inactive\PlaceholderText=#eeeeee
|
||||||
|
Inactive\Shadow=#767676
|
||||||
|
Inactive\Text=#eeeeee
|
||||||
|
Inactive\ToolTipBase=#ffffdc
|
||||||
|
Inactive\ToolTipText=#eeeeee
|
||||||
|
Inactive\Window=#202225
|
||||||
|
Inactive\WindowText=#eeeeee
|
61
rare/styles/colors/ia_ora.scheme
Normal file
61
rare/styles/colors/ia_ora.scheme
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
[ColorScheme]
|
||||||
|
Active\AlternateBase=#eff3f7
|
||||||
|
Active\Base=#eff3f7
|
||||||
|
Active\BrightText=#ffffff
|
||||||
|
Active\Button=#eff3f7
|
||||||
|
Active\ButtonText=#000000
|
||||||
|
Active\Dark=#c7cbce
|
||||||
|
Active\Highlight=#4965ae
|
||||||
|
Active\HighlightedText=#ffffff
|
||||||
|
Active\Light=#ffffff
|
||||||
|
Active\Link=#0000ff
|
||||||
|
Active\LinkVisited=#ff00ff
|
||||||
|
Active\Mid=#a0a0a4
|
||||||
|
Active\Midlight=#e9e7e3
|
||||||
|
Active\PlaceholderText=#000000
|
||||||
|
Active\Shadow=#b8bbbe
|
||||||
|
Active\Text=#000000
|
||||||
|
Active\ToolTipBase=#ffffdc
|
||||||
|
Active\ToolTipText=#000000
|
||||||
|
Active\Window=#eff3f7
|
||||||
|
Active\WindowText=#000000
|
||||||
|
Disabled\AlternateBase=#eff3f7
|
||||||
|
Disabled\Base=#eff3f7
|
||||||
|
Disabled\BrightText=#ffffff
|
||||||
|
Disabled\Button=#eff3f7
|
||||||
|
Disabled\ButtonText=#808080
|
||||||
|
Disabled\Dark=#c7cbce
|
||||||
|
Disabled\Highlight=#4965ae
|
||||||
|
Disabled\HighlightedText=#808080
|
||||||
|
Disabled\Light=#ffffff
|
||||||
|
Disabled\Link=#0000ff
|
||||||
|
Disabled\LinkVisited=#ff00ff
|
||||||
|
Disabled\Mid=#a0a0a4
|
||||||
|
Disabled\Midlight=#e9e7e3
|
||||||
|
Disabled\PlaceholderText=#000000
|
||||||
|
Disabled\Shadow=#b8bbbe
|
||||||
|
Disabled\Text=#808080
|
||||||
|
Disabled\ToolTipBase=#ffffdc
|
||||||
|
Disabled\ToolTipText=#000000
|
||||||
|
Disabled\Window=#eff3f7
|
||||||
|
Disabled\WindowText=#808080
|
||||||
|
Inactive\AlternateBase=#eff3f7
|
||||||
|
Inactive\Base=#eff3f7
|
||||||
|
Inactive\BrightText=#ffffff
|
||||||
|
Inactive\Button=#eff3f7
|
||||||
|
Inactive\ButtonText=#000000
|
||||||
|
Inactive\Dark=#c7cbce
|
||||||
|
Inactive\Highlight=#4965ae
|
||||||
|
Inactive\HighlightedText=#ffffff
|
||||||
|
Inactive\Light=#ffffff
|
||||||
|
Inactive\Link=#0000ff
|
||||||
|
Inactive\LinkVisited=#ff00ff
|
||||||
|
Inactive\Mid=#a0a0a4
|
||||||
|
Inactive\Midlight=#e9e7e3
|
||||||
|
Inactive\PlaceholderText=#000000
|
||||||
|
Inactive\Shadow=#b8bbbe
|
||||||
|
Inactive\Text=#000000
|
||||||
|
Inactive\ToolTipBase=#ffffdc
|
||||||
|
Inactive\ToolTipText=#000000
|
||||||
|
Inactive\Window=#eff3f7
|
||||||
|
Inactive\WindowText=#000000
|
256
rare/styles/qss/RareStyle.qss
Normal file
256
rare/styles/qss/RareStyle.qss
Normal file
|
@ -0,0 +1,256 @@
|
||||||
|
QWidget {
|
||||||
|
background-color: #202225;
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel {
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit {
|
||||||
|
border: 1px solid darkslategrey;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #334;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar {
|
||||||
|
border: 1px solid darkslategrey;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #334;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::add-line:vertical {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
height: 0px;
|
||||||
|
subcontrol-position: bottom;
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::sub-line:vertical {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
height: 0px;
|
||||||
|
subcontrol-position: top;
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::add-line:horizontal {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
height: 0px;
|
||||||
|
subcontrol-position: right;
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::sub-line:horizontal {
|
||||||
|
border: none;
|
||||||
|
background: green;
|
||||||
|
height: 0px;
|
||||||
|
subcontrol-position: left;
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::handle{
|
||||||
|
border: 1px solid darkslategrey;
|
||||||
|
background-color: gray;
|
||||||
|
border-radius: 4px;
|
||||||
|
min-height: 20px;
|
||||||
|
min-width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar#main_tab_bar {
|
||||||
|
border-bottom: none;
|
||||||
|
background-color: #2b2b2c;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab#main_tab_bar {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab#main_tab_bar {
|
||||||
|
border-bottom: none;
|
||||||
|
padding: 5px
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab:selected#main_tab_bar {
|
||||||
|
background-color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab:hover#main_tab_bar {
|
||||||
|
border-bottom: 2px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox {
|
||||||
|
border: 1px solid gray;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-top: 3ex;
|
||||||
|
padding-top: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox#settings_widget {
|
||||||
|
border: 1px solid gray;
|
||||||
|
font-size: 13px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-top: 1ex;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox#game_widget_icon {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox#group {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
border: 1px solid white;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QToolButton {
|
||||||
|
border: 1px solid gray;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #3c3f41;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton:hover {
|
||||||
|
background-color: #223;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton {
|
||||||
|
border: 1px solid gray;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #3c3f41;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover {
|
||||||
|
background-color: #223;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover#menu_button {
|
||||||
|
background-color: #334;
|
||||||
|
}
|
||||||
|
|
||||||
|
QRadioButton {
|
||||||
|
background-color: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
QRadioButton::indicator {
|
||||||
|
border: 1px solid gray;
|
||||||
|
border-radius: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox {
|
||||||
|
background-color: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox::indicator {
|
||||||
|
border: 1px solid gray;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox::indicator:checked {
|
||||||
|
width: -20ex;
|
||||||
|
height: -20ex;
|
||||||
|
background: #5F5F80;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QSpinBox {
|
||||||
|
border: 1px solid darkslategrey;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #334;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
QCheckBox::indicator {
|
||||||
|
border: 1px solid gray;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
QComboBox {
|
||||||
|
border: 1px solid gray;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #3c3f41;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox::drop-down {
|
||||||
|
subcontrol-origin: padding;
|
||||||
|
subcontrol-position: top right;
|
||||||
|
width: 15px;
|
||||||
|
/*
|
||||||
|
border-left-width: 1px;
|
||||||
|
border-left-color: darkgray;
|
||||||
|
border-left-style: solid;
|
||||||
|
*/
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
border-bottom-right-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#list_widget {
|
||||||
|
border-top: 2px solid white;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover#installed_menu_button {
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab#settings_bar {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab:hover#settings_bar {
|
||||||
|
border-left: 2px solid white;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab::selected#settings_bar {
|
||||||
|
background-color: darkslategrey;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search_bar {
|
||||||
|
padding: 3px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #334;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab:disabled#settings_bar {
|
||||||
|
color: transparent;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
213
rare/ui/components/tabs/games/game_info/game_info.py
Normal file
213
rare/ui/components/tabs/games/game_info/game_info.py
Normal file
|
@ -0,0 +1,213 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'game_info.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_GameInfo(object):
|
||||||
|
def setupUi(self, GameInfo):
|
||||||
|
GameInfo.setObjectName("GameInfo")
|
||||||
|
self.layout_game_info = QtWidgets.QGridLayout(GameInfo)
|
||||||
|
self.layout_game_info.setObjectName("layout_game_info")
|
||||||
|
self.layout_game_info_form = QtWidgets.QGridLayout()
|
||||||
|
self.layout_game_info_form.setContentsMargins(6, 6, 6, 6)
|
||||||
|
self.layout_game_info_form.setSpacing(12)
|
||||||
|
self.layout_game_info_form.setObjectName("layout_game_info_form")
|
||||||
|
self.install_size = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.install_size.setText("error")
|
||||||
|
self.install_size.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.install_size.setObjectName("install_size")
|
||||||
|
self.layout_game_info_form.addWidget(self.install_size, 4, 1, 1, 1)
|
||||||
|
self.lbl_dev = QtWidgets.QLabel(GameInfo)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.lbl_dev.sizePolicy().hasHeightForWidth())
|
||||||
|
self.lbl_dev.setSizePolicy(sizePolicy)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lbl_dev.setFont(font)
|
||||||
|
self.lbl_dev.setObjectName("lbl_dev")
|
||||||
|
self.layout_game_info_form.addWidget(self.lbl_dev, 0, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.version = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.version.setText("error")
|
||||||
|
self.version.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.version.setObjectName("version")
|
||||||
|
self.layout_game_info_form.addWidget(self.version, 2, 1, 1, 1)
|
||||||
|
self.lbl_install_path = QtWidgets.QLabel(GameInfo)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.lbl_install_path.sizePolicy().hasHeightForWidth())
|
||||||
|
self.lbl_install_path.setSizePolicy(sizePolicy)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lbl_install_path.setFont(font)
|
||||||
|
self.lbl_install_path.setObjectName("lbl_install_path")
|
||||||
|
self.layout_game_info_form.addWidget(self.lbl_install_path, 5, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.lbl_install_size = QtWidgets.QLabel(GameInfo)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.lbl_install_size.sizePolicy().hasHeightForWidth())
|
||||||
|
self.lbl_install_size.setSizePolicy(sizePolicy)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lbl_install_size.setFont(font)
|
||||||
|
self.lbl_install_size.setObjectName("lbl_install_size")
|
||||||
|
self.layout_game_info_form.addWidget(self.lbl_install_size, 4, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
spacerItem = QtWidgets.QSpacerItem(0, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
|
self.layout_game_info_form.addItem(spacerItem, 7, 1, 1, 1)
|
||||||
|
spacerItem1 = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
|
self.layout_game_info_form.addItem(spacerItem1, 7, 0, 1, 1)
|
||||||
|
self.wg_game_actions = QtWidgets.QWidget(GameInfo)
|
||||||
|
self.wg_game_actions.setMinimumSize(QtCore.QSize(250, 0))
|
||||||
|
self.wg_game_actions.setObjectName("wg_game_actions")
|
||||||
|
self.layout_game_actions = QtWidgets.QVBoxLayout(self.wg_game_actions)
|
||||||
|
self.layout_game_actions.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.layout_game_actions.setObjectName("layout_game_actions")
|
||||||
|
self.uninstall_button = QtWidgets.QPushButton(self.wg_game_actions)
|
||||||
|
self.uninstall_button.setObjectName("uninstall_button")
|
||||||
|
self.layout_game_actions.addWidget(self.uninstall_button)
|
||||||
|
self.verify_widget = QtWidgets.QStackedWidget(self.wg_game_actions)
|
||||||
|
self.verify_widget.setObjectName("verify_widget")
|
||||||
|
self.page_verify_button = QtWidgets.QWidget()
|
||||||
|
self.page_verify_button.setObjectName("page_verify_button")
|
||||||
|
self.layout_verify_button = QtWidgets.QVBoxLayout(self.page_verify_button)
|
||||||
|
self.layout_verify_button.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.layout_verify_button.setSpacing(0)
|
||||||
|
self.layout_verify_button.setObjectName("layout_verify_button")
|
||||||
|
self.verify_button = QtWidgets.QPushButton(self.page_verify_button)
|
||||||
|
self.verify_button.setObjectName("verify_button")
|
||||||
|
self.layout_verify_button.addWidget(self.verify_button)
|
||||||
|
self.verify_widget.addWidget(self.page_verify_button)
|
||||||
|
self.page_verify_progress = QtWidgets.QWidget()
|
||||||
|
self.page_verify_progress.setObjectName("page_verify_progress")
|
||||||
|
self.layout_verify_progress = QtWidgets.QVBoxLayout(self.page_verify_progress)
|
||||||
|
self.layout_verify_progress.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.layout_verify_progress.setSpacing(0)
|
||||||
|
self.layout_verify_progress.setObjectName("layout_verify_progress")
|
||||||
|
self.verify_progress = QtWidgets.QProgressBar(self.page_verify_progress)
|
||||||
|
self.verify_progress.setProperty("value", 24)
|
||||||
|
self.verify_progress.setObjectName("verify_progress")
|
||||||
|
self.layout_verify_progress.addWidget(self.verify_progress)
|
||||||
|
self.verify_widget.addWidget(self.page_verify_progress)
|
||||||
|
self.layout_game_actions.addWidget(self.verify_widget)
|
||||||
|
self.repair_button = QtWidgets.QPushButton(self.wg_game_actions)
|
||||||
|
self.repair_button.setObjectName("repair_button")
|
||||||
|
self.layout_game_actions.addWidget(self.repair_button)
|
||||||
|
self.layout_game_info_form.addWidget(self.wg_game_actions, 6, 1, 1, 1, QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||||
|
self.lbl_version = QtWidgets.QLabel(GameInfo)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.lbl_version.sizePolicy().hasHeightForWidth())
|
||||||
|
self.lbl_version.setSizePolicy(sizePolicy)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lbl_version.setFont(font)
|
||||||
|
self.lbl_version.setObjectName("lbl_version")
|
||||||
|
self.layout_game_info_form.addWidget(self.lbl_version, 2, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.lbl_app_name = QtWidgets.QLabel(GameInfo)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.lbl_app_name.sizePolicy().hasHeightForWidth())
|
||||||
|
self.lbl_app_name.setSizePolicy(sizePolicy)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lbl_app_name.setFont(font)
|
||||||
|
self.lbl_app_name.setObjectName("lbl_app_name")
|
||||||
|
self.layout_game_info_form.addWidget(self.lbl_app_name, 1, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.dev = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.dev.setText("error")
|
||||||
|
self.dev.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.dev.setObjectName("dev")
|
||||||
|
self.layout_game_info_form.addWidget(self.dev, 0, 1, 1, 1)
|
||||||
|
self.app_name = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.app_name.setText("error")
|
||||||
|
self.app_name.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.app_name.setObjectName("app_name")
|
||||||
|
self.layout_game_info_form.addWidget(self.app_name, 1, 1, 1, 1)
|
||||||
|
self.install_path = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.install_path.setText("error")
|
||||||
|
self.install_path.setWordWrap(True)
|
||||||
|
self.install_path.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.install_path.setObjectName("install_path")
|
||||||
|
self.layout_game_info_form.addWidget(self.install_path, 5, 1, 1, 1)
|
||||||
|
self.lbl_game_actions = QtWidgets.QLabel(GameInfo)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.lbl_game_actions.sizePolicy().hasHeightForWidth())
|
||||||
|
self.lbl_game_actions.setSizePolicy(sizePolicy)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lbl_game_actions.setFont(font)
|
||||||
|
self.lbl_game_actions.setObjectName("lbl_game_actions")
|
||||||
|
self.layout_game_info_form.addWidget(self.lbl_game_actions, 6, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.lbl_grade = QtWidgets.QLabel(GameInfo)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lbl_grade.setFont(font)
|
||||||
|
self.lbl_grade.setObjectName("lbl_grade")
|
||||||
|
self.layout_game_info_form.addWidget(self.lbl_grade, 3, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.grade = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.grade.setText("error")
|
||||||
|
self.grade.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.grade.setObjectName("grade")
|
||||||
|
self.layout_game_info_form.addWidget(self.grade, 3, 1, 1, 1)
|
||||||
|
self.layout_game_info.addLayout(self.layout_game_info_form, 2, 1, 1, 1)
|
||||||
|
self.image = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.image.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||||
|
self.image.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||||
|
self.image.setText("")
|
||||||
|
self.image.setObjectName("image")
|
||||||
|
self.layout_game_info.addWidget(self.image, 2, 0, 1, 1, QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||||
|
self.game_title = QtWidgets.QLabel(GameInfo)
|
||||||
|
self.game_title.setText("error")
|
||||||
|
self.game_title.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.game_title.setObjectName("game_title")
|
||||||
|
self.layout_game_info.addWidget(self.game_title, 0, 0, 1, 3)
|
||||||
|
|
||||||
|
self.retranslateUi(GameInfo)
|
||||||
|
self.verify_widget.setCurrentIndex(0)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(GameInfo)
|
||||||
|
|
||||||
|
def retranslateUi(self, GameInfo):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
GameInfo.setWindowTitle(_translate("GameInfo", "Game Info"))
|
||||||
|
self.lbl_dev.setText(_translate("GameInfo", "Developer"))
|
||||||
|
self.lbl_install_path.setText(_translate("GameInfo", "Installation Path"))
|
||||||
|
self.lbl_install_size.setText(_translate("GameInfo", "Installation Size"))
|
||||||
|
self.uninstall_button.setText(_translate("GameInfo", "Uninstall Game"))
|
||||||
|
self.verify_button.setText(_translate("GameInfo", "Verify Installation"))
|
||||||
|
self.repair_button.setText(_translate("GameInfo", "Repair Instalation"))
|
||||||
|
self.lbl_version.setText(_translate("GameInfo", "Version"))
|
||||||
|
self.lbl_app_name.setText(_translate("GameInfo", "Application Name"))
|
||||||
|
self.lbl_game_actions.setText(_translate("GameInfo", "Actions"))
|
||||||
|
self.lbl_grade.setText(_translate("GameInfo", "ProtonDB Grade"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
GameInfo = QtWidgets.QWidget()
|
||||||
|
ui = Ui_GameInfo()
|
||||||
|
ui.setupUi(GameInfo)
|
||||||
|
GameInfo.show()
|
||||||
|
sys.exit(app.exec_())
|
376
rare/ui/components/tabs/games/game_info/game_info.ui
Normal file
376
rare/ui/components/tabs/games/game_info/game_info.ui
Normal file
|
@ -0,0 +1,376 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>GameInfo</class>
|
||||||
|
<widget class="QWidget" name="GameInfo">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>436</width>
|
||||||
|
<height>317</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Game Info</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="layout_game_info">
|
||||||
|
<item row="2" column="1">
|
||||||
|
<layout class="QGridLayout" name="layout_game_info_form">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLabel" name="install_size">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_dev">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Developer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="version">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_install_path">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Installation Path</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_install_size">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Installation Size</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<spacer name="hs_game_info_form">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<spacer name="vs_game_info_form">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1" alignment="Qt::AlignLeft|Qt::AlignTop">
|
||||||
|
<widget class="QWidget" name="wg_game_actions" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>250</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="layout_game_actions">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="uninstall_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Uninstall Game</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QStackedWidget" name="verify_widget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="page_verify_button">
|
||||||
|
<layout class="QVBoxLayout" name="layout_verify_button">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="verify_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Verify Installation</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_verify_progress">
|
||||||
|
<layout class="QVBoxLayout" name="layout_verify_progress">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="verify_progress">
|
||||||
|
<property name="value">
|
||||||
|
<number>24</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="repair_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Repair Instalation</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_version">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Version</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_app_name">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Application Name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="dev">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="app_name">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLabel" name="install_path">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_game_actions">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Actions</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_grade">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>ProtonDB Grade</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="grade">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" alignment="Qt::AlignLeft|Qt::AlignTop">
|
||||||
|
<widget class="QLabel" name="image">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="game_title">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
153
rare/ui/components/tabs/games/game_info/game_settings.py
Normal file
153
rare/ui/components/tabs/games/game_info/game_settings.py
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'game_settings.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_GameSettings(object):
|
||||||
|
def setupUi(self, GameSettings):
|
||||||
|
GameSettings.setObjectName("GameSettings")
|
||||||
|
self.game_settings_layout = QtWidgets.QVBoxLayout(GameSettings)
|
||||||
|
self.game_settings_layout.setObjectName("game_settings_layout")
|
||||||
|
self.title = QtWidgets.QLabel(GameSettings)
|
||||||
|
self.title.setText("error")
|
||||||
|
self.title.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
|
||||||
|
self.title.setObjectName("title")
|
||||||
|
self.game_settings_layout.addWidget(self.title)
|
||||||
|
self.launch_settings_groupbox = QtWidgets.QGroupBox(GameSettings)
|
||||||
|
self.launch_settings_groupbox.setObjectName("launch_settings_groupbox")
|
||||||
|
self.launch_settings_layout = QtWidgets.QGridLayout(self.launch_settings_groupbox)
|
||||||
|
self.launch_settings_layout.setObjectName("launch_settings_layout")
|
||||||
|
self.skip_update = QtWidgets.QComboBox(self.launch_settings_groupbox)
|
||||||
|
self.skip_update.setObjectName("skip_update")
|
||||||
|
self.skip_update.addItem("")
|
||||||
|
self.skip_update.addItem("")
|
||||||
|
self.skip_update.addItem("")
|
||||||
|
self.launch_settings_layout.addWidget(self.skip_update, 0, 1, 1, 1, QtCore.Qt.AlignLeft)
|
||||||
|
self.cloud_sync = QtWidgets.QCheckBox(self.launch_settings_groupbox)
|
||||||
|
self.cloud_sync.setText("")
|
||||||
|
self.cloud_sync.setObjectName("cloud_sync")
|
||||||
|
self.launch_settings_layout.addWidget(self.cloud_sync, 2, 1, 1, 1, QtCore.Qt.AlignLeft)
|
||||||
|
self.launch_params_label = QtWidgets.QLabel(self.launch_settings_groupbox)
|
||||||
|
self.launch_params_label.setObjectName("launch_params_label")
|
||||||
|
self.launch_settings_layout.addWidget(self.launch_params_label, 3, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.wrapper_label = QtWidgets.QLabel(self.launch_settings_groupbox)
|
||||||
|
self.wrapper_label.setObjectName("wrapper_label")
|
||||||
|
self.launch_settings_layout.addWidget(self.wrapper_label, 4, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.skip_update_label = QtWidgets.QLabel(self.launch_settings_groupbox)
|
||||||
|
self.skip_update_label.setObjectName("skip_update_label")
|
||||||
|
self.launch_settings_layout.addWidget(self.skip_update_label, 0, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.wrapper_widget = QtWidgets.QWidget(self.launch_settings_groupbox)
|
||||||
|
self.wrapper_widget.setObjectName("wrapper_widget")
|
||||||
|
self.wrapper_layout = QtWidgets.QHBoxLayout(self.wrapper_widget)
|
||||||
|
self.wrapper_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.wrapper_layout.setObjectName("wrapper_layout")
|
||||||
|
self.wrapper = QtWidgets.QLineEdit(self.wrapper_widget)
|
||||||
|
self.wrapper.setMinimumSize(QtCore.QSize(400, 0))
|
||||||
|
self.wrapper.setObjectName("wrapper")
|
||||||
|
self.wrapper_layout.addWidget(self.wrapper)
|
||||||
|
self.wrapper_button = QtWidgets.QPushButton(self.wrapper_widget)
|
||||||
|
self.wrapper_button.setObjectName("wrapper_button")
|
||||||
|
self.wrapper_layout.addWidget(self.wrapper_button)
|
||||||
|
self.launch_settings_layout.addWidget(self.wrapper_widget, 4, 1, 1, 1)
|
||||||
|
self.offline_label = QtWidgets.QLabel(self.launch_settings_groupbox)
|
||||||
|
self.offline_label.setObjectName("offline_label")
|
||||||
|
self.launch_settings_layout.addWidget(self.offline_label, 1, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.offline = QtWidgets.QComboBox(self.launch_settings_groupbox)
|
||||||
|
self.offline.setObjectName("offline")
|
||||||
|
self.offline.addItem("")
|
||||||
|
self.offline.addItem("")
|
||||||
|
self.offline.addItem("")
|
||||||
|
self.launch_settings_layout.addWidget(self.offline, 1, 1, 1, 1, QtCore.Qt.AlignLeft)
|
||||||
|
self.launch_params_widget = QtWidgets.QWidget(self.launch_settings_groupbox)
|
||||||
|
self.launch_params_widget.setObjectName("launch_params_widget")
|
||||||
|
self.launch_params_layout = QtWidgets.QHBoxLayout(self.launch_params_widget)
|
||||||
|
self.launch_params_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.launch_params_layout.setObjectName("launch_params_layout")
|
||||||
|
self.launch_params = QtWidgets.QLineEdit(self.launch_params_widget)
|
||||||
|
self.launch_params.setMinimumSize(QtCore.QSize(400, 0))
|
||||||
|
self.launch_params.setObjectName("launch_params")
|
||||||
|
self.launch_params_layout.addWidget(self.launch_params)
|
||||||
|
self.launch_params_button = QtWidgets.QPushButton(self.launch_params_widget)
|
||||||
|
self.launch_params_button.setObjectName("launch_params_button")
|
||||||
|
self.launch_params_layout.addWidget(self.launch_params_button)
|
||||||
|
self.launch_settings_layout.addWidget(self.launch_params_widget, 3, 1, 1, 1)
|
||||||
|
self.cloud_sync_label = QtWidgets.QLabel(self.launch_settings_groupbox)
|
||||||
|
self.cloud_sync_label.setObjectName("cloud_sync_label")
|
||||||
|
self.launch_settings_layout.addWidget(self.cloud_sync_label, 2, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.game_settings_layout.addWidget(self.launch_settings_groupbox)
|
||||||
|
self.proton_groupbox = QtWidgets.QGroupBox(GameSettings)
|
||||||
|
self.proton_groupbox.setObjectName("proton_groupbox")
|
||||||
|
self.proton_layout = QtWidgets.QGridLayout(self.proton_groupbox)
|
||||||
|
self.proton_layout.setObjectName("proton_layout")
|
||||||
|
self.proton_wrapper = QtWidgets.QComboBox(self.proton_groupbox)
|
||||||
|
self.proton_wrapper.setObjectName("proton_wrapper")
|
||||||
|
self.proton_wrapper.addItem("")
|
||||||
|
self.proton_layout.addWidget(self.proton_wrapper, 0, 1, 1, 1, QtCore.Qt.AlignLeft)
|
||||||
|
self.proton_wrapper_label = QtWidgets.QLabel(self.proton_groupbox)
|
||||||
|
self.proton_wrapper_label.setObjectName("proton_wrapper_label")
|
||||||
|
self.proton_layout.addWidget(self.proton_wrapper_label, 0, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.proton_prefix_label = QtWidgets.QLabel(self.proton_groupbox)
|
||||||
|
self.proton_prefix_label.setObjectName("proton_prefix_label")
|
||||||
|
self.proton_layout.addWidget(self.proton_prefix_label, 1, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
spacerItem = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum)
|
||||||
|
self.proton_layout.addItem(spacerItem, 4, 1, 1, 1)
|
||||||
|
self.proton_prefix_layout = QtWidgets.QVBoxLayout()
|
||||||
|
self.proton_prefix_layout.setObjectName("proton_prefix_layout")
|
||||||
|
self.proton_layout.addLayout(self.proton_prefix_layout, 1, 1, 2, 1)
|
||||||
|
self.proton_prefix_alignment_label = QtWidgets.QLabel(self.proton_groupbox)
|
||||||
|
self.proton_prefix_alignment_label.setEnabled(False)
|
||||||
|
self.proton_prefix_alignment_label.setText("")
|
||||||
|
self.proton_prefix_alignment_label.setObjectName("proton_prefix_alignment_label")
|
||||||
|
self.proton_layout.addWidget(self.proton_prefix_alignment_label, 2, 0, 1, 1)
|
||||||
|
self.linux_layout = QtWidgets.QVBoxLayout()
|
||||||
|
self.linux_layout.setSpacing(0)
|
||||||
|
self.linux_layout.setObjectName("linux_layout")
|
||||||
|
self.proton_layout.addLayout(self.linux_layout, 3, 0, 1, 2)
|
||||||
|
self.game_settings_layout.addWidget(self.proton_groupbox)
|
||||||
|
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
|
self.game_settings_layout.addItem(spacerItem1)
|
||||||
|
|
||||||
|
self.retranslateUi(GameSettings)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(GameSettings)
|
||||||
|
|
||||||
|
def retranslateUi(self, GameSettings):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
GameSettings.setWindowTitle(_translate("GameSettings", "Game Settings"))
|
||||||
|
self.launch_settings_groupbox.setTitle(_translate("GameSettings", "Launch Settings"))
|
||||||
|
self.skip_update.setItemText(0, _translate("GameSettings", "Default"))
|
||||||
|
self.skip_update.setItemText(1, _translate("GameSettings", "Yes"))
|
||||||
|
self.skip_update.setItemText(2, _translate("GameSettings", "No"))
|
||||||
|
self.launch_params_label.setText(_translate("GameSettings", "Launch parameters"))
|
||||||
|
self.wrapper_label.setText(_translate("GameSettings", "Wrapper"))
|
||||||
|
self.skip_update_label.setText(_translate("GameSettings", "Skip update check"))
|
||||||
|
self.wrapper.setPlaceholderText(_translate("GameSettings", "e.g. optirun"))
|
||||||
|
self.wrapper_button.setText(_translate("GameSettings", "Save"))
|
||||||
|
self.offline_label.setText(_translate("GameSettings", "Offline mode"))
|
||||||
|
self.offline.setItemText(0, _translate("GameSettings", "Default"))
|
||||||
|
self.offline.setItemText(1, _translate("GameSettings", "Yes"))
|
||||||
|
self.offline.setItemText(2, _translate("GameSettings", "No"))
|
||||||
|
self.launch_params.setPlaceholderText(_translate("GameSettings", "parameters"))
|
||||||
|
self.launch_params_button.setText(_translate("GameSettings", "Save"))
|
||||||
|
self.cloud_sync_label.setText(_translate("GameSettings", "Sync with cloud"))
|
||||||
|
self.proton_groupbox.setTitle(_translate("GameSettings", "Linux Settings"))
|
||||||
|
self.proton_wrapper.setItemText(0, _translate("GameSettings", "Don\'t use Proton"))
|
||||||
|
self.proton_wrapper_label.setText(_translate("GameSettings", "Proton"))
|
||||||
|
self.proton_prefix_label.setText(_translate("GameSettings", "Prefix"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
GameSettings = QtWidgets.QWidget()
|
||||||
|
ui = Ui_GameSettings()
|
||||||
|
ui.setupUi(GameSettings)
|
||||||
|
GameSettings.show()
|
||||||
|
sys.exit(app.exec_())
|
277
rare/ui/components/tabs/games/game_info/game_settings.ui
Normal file
277
rare/ui/components/tabs/games/game_info/game_settings.ui
Normal file
|
@ -0,0 +1,277 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>GameSettings</class>
|
||||||
|
<widget class="QWidget" name="GameSettings">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>759</width>
|
||||||
|
<height>617</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Game Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="game_settings_layout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="title">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="launch_settings_groupbox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Launch Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="launch_settings_layout">
|
||||||
|
<item row="0" column="1" alignment="Qt::AlignLeft">
|
||||||
|
<widget class="QComboBox" name="skip_update">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Yes</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>No</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" alignment="Qt::AlignLeft">
|
||||||
|
<widget class="QCheckBox" name="cloud_sync">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="launch_params_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Launch parameters</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="wrapper_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Wrapper</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="skip_update_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Skip update check</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QWidget" name="wrapper_widget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="wrapper_layout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="wrapper">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>e.g. optirun</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="wrapper_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Save</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="offline_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Offline mode</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" alignment="Qt::AlignLeft">
|
||||||
|
<widget class="QComboBox" name="offline">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Yes</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>No</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QWidget" name="launch_params_widget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="launch_params_layout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="launch_params">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>400</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>parameters</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="launch_params_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Save</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="cloud_sync_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Sync with cloud</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="proton_groupbox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Linux Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="proton_layout">
|
||||||
|
<item row="0" column="1" alignment="Qt::AlignLeft">
|
||||||
|
<widget class="QComboBox" name="proton_wrapper">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't use Proton</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="proton_wrapper_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Proton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="proton_prefix_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Prefix</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Maximum</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" rowspan="2">
|
||||||
|
<layout class="QVBoxLayout" name="proton_prefix_layout"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="proton_prefix_alignment_label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<layout class="QVBoxLayout" name="linux_layout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="game_settings_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/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
118
rare/ui/components/tabs/settings/about.py
Normal file
118
rare/ui/components/tabs/settings/about.py
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'about.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_About(object):
|
||||||
|
def setupUi(self, About):
|
||||||
|
About.setObjectName("About")
|
||||||
|
About.resize(499, 396)
|
||||||
|
self.gridLayout = QtWidgets.QGridLayout(About)
|
||||||
|
self.gridLayout.setObjectName("gridLayout")
|
||||||
|
self.open_browser = QtWidgets.QPushButton(About)
|
||||||
|
self.open_browser.setObjectName("open_browser")
|
||||||
|
self.gridLayout.addWidget(self.open_browser, 4, 1, 1, 1)
|
||||||
|
self.version_label = QtWidgets.QLabel(About)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.version_label.setFont(font)
|
||||||
|
self.version_label.setObjectName("version_label")
|
||||||
|
self.gridLayout.addWidget(self.version_label, 2, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.license_label = QtWidgets.QLabel(About)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.license_label.setFont(font)
|
||||||
|
self.license_label.setObjectName("license_label")
|
||||||
|
self.gridLayout.addWidget(self.license_label, 7, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.lgd_dev_label = QtWidgets.QLabel(About)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.lgd_dev_label.setFont(font)
|
||||||
|
self.lgd_dev_label.setObjectName("lgd_dev_label")
|
||||||
|
self.gridLayout.addWidget(self.lgd_dev_label, 6, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.dev = QtWidgets.QLabel(About)
|
||||||
|
self.dev.setText("<a href=\'https://github.com/Dummerle\'>Dummerle</a>")
|
||||||
|
self.dev.setOpenExternalLinks(True)
|
||||||
|
self.dev.setObjectName("dev")
|
||||||
|
self.gridLayout.addWidget(self.dev, 5, 1, 1, 1)
|
||||||
|
self.update_label = QtWidgets.QLabel(About)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.update_label.setFont(font)
|
||||||
|
self.update_label.setObjectName("update_label")
|
||||||
|
self.gridLayout.addWidget(self.update_label, 3, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.version = QtWidgets.QLabel(About)
|
||||||
|
self.version.setText("error")
|
||||||
|
self.version.setObjectName("version")
|
||||||
|
self.gridLayout.addWidget(self.version, 2, 1, 1, 1)
|
||||||
|
self.dev_label = QtWidgets.QLabel(About)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setBold(True)
|
||||||
|
font.setWeight(75)
|
||||||
|
self.dev_label.setFont(font)
|
||||||
|
self.dev_label.setObjectName("dev_label")
|
||||||
|
self.gridLayout.addWidget(self.dev_label, 5, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.license = QtWidgets.QLabel(About)
|
||||||
|
self.license.setObjectName("license")
|
||||||
|
self.gridLayout.addWidget(self.license, 7, 1, 1, 1)
|
||||||
|
self.update = QtWidgets.QLabel(About)
|
||||||
|
self.update.setText("error")
|
||||||
|
self.update.setObjectName("update")
|
||||||
|
self.gridLayout.addWidget(self.update, 3, 1, 1, 1)
|
||||||
|
self.lgd_dev = QtWidgets.QLabel(About)
|
||||||
|
self.lgd_dev.setText("<a href=\'https://github.com/derrod/\'>derrod</a>")
|
||||||
|
self.lgd_dev.setOpenExternalLinks(True)
|
||||||
|
self.lgd_dev.setObjectName("lgd_dev")
|
||||||
|
self.gridLayout.addWidget(self.lgd_dev, 6, 1, 1, 1)
|
||||||
|
self.info_text = QtWidgets.QLabel(About)
|
||||||
|
self.info_text.setWordWrap(True)
|
||||||
|
self.info_text.setOpenExternalLinks(True)
|
||||||
|
self.info_text.setObjectName("info_text")
|
||||||
|
self.gridLayout.addWidget(self.info_text, 14, 0, 1, 3)
|
||||||
|
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
|
self.gridLayout.addItem(spacerItem, 15, 0, 1, 3)
|
||||||
|
self.title = QtWidgets.QLabel(About)
|
||||||
|
self.title.setObjectName("title")
|
||||||
|
self.gridLayout.addWidget(self.title, 1, 0, 1, 3)
|
||||||
|
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
|
self.gridLayout.addItem(spacerItem1, 2, 2, 6, 1)
|
||||||
|
|
||||||
|
self.retranslateUi(About)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(About)
|
||||||
|
|
||||||
|
def retranslateUi(self, About):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
About.setWindowTitle(_translate("About", "About"))
|
||||||
|
self.open_browser.setText(_translate("About", "Download latest release"))
|
||||||
|
self.version_label.setText(_translate("About", "Version"))
|
||||||
|
self.license_label.setText(_translate("About", "License"))
|
||||||
|
self.lgd_dev_label.setText(_translate("About", "Legendary Developer"))
|
||||||
|
self.dev.setToolTip(_translate("About", "Github"))
|
||||||
|
self.update_label.setText(_translate("About", "Update available"))
|
||||||
|
self.dev_label.setText(_translate("About", "Rare Developer"))
|
||||||
|
self.license.setText(_translate("About", "GNU General Public License v3.0"))
|
||||||
|
self.lgd_dev.setToolTip(_translate("About", "Github"))
|
||||||
|
self.info_text.setText(_translate("About", "This is a beta version, so you can get bugs. If you get a bug, please report it by creating an Issue on <a href=\'https://github.com/Dummerle/Rare/issues\'>Github</a>. You can also contact me on Discord (Dummerle#7419). Or you can join the <a href=\'https://discord.gg/YvmABK9YSk\'>Discord server</a>"))
|
||||||
|
self.title.setText(_translate("About", "<h2>About</h2>"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
About = QtWidgets.QWidget()
|
||||||
|
ui = Ui_About()
|
||||||
|
ui.setupUi(About)
|
||||||
|
About.show()
|
||||||
|
sys.exit(app.exec_())
|
186
rare/ui/components/tabs/settings/about.ui
Normal file
186
rare/ui/components/tabs/settings/about.ui
Normal file
|
@ -0,0 +1,186 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>About</class>
|
||||||
|
<widget class="QWidget" name="About">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>499</width>
|
||||||
|
<height>396</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>About</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QPushButton" name="open_browser">
|
||||||
|
<property name="text">
|
||||||
|
<string>Download latest release</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="version_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Version</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="license_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>License</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lgd_dev_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Legendary Developer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLabel" name="dev">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Github</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"><a href='https://github.com/Dummerle'>Dummerle</a></string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="update_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Update available</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="version">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="dev_label">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Rare Developer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QLabel" name="license">
|
||||||
|
<property name="text">
|
||||||
|
<string>GNU General Public License v3.0</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="update">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">error</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QLabel" name="lgd_dev">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Github</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"><a href='https://github.com/derrod/'>derrod</a></string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="info_text">
|
||||||
|
<property name="text">
|
||||||
|
<string>This is a beta version, so you can get bugs. If you get a bug, please report it by creating an Issue on <a href='https://github.com/Dummerle/Rare/issues'>Github</a>. You can also contact me on Discord (Dummerle#7419). Or you can join the <a href='https://discord.gg/YvmABK9YSk'>Discord server</a></string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="0" colspan="3">
|
||||||
|
<spacer name="about_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="1" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="title">
|
||||||
|
<property name="text">
|
||||||
|
<string><h2>About</h2></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2" rowspan="6">
|
||||||
|
<spacer name="about_hspacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
97
rare/ui/components/tabs/settings/dxvk.py
Normal file
97
rare/ui/components/tabs/settings/dxvk.py
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'dxvk.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_DxvkSettings(object):
|
||||||
|
def setupUi(self, DxvkSettings):
|
||||||
|
DxvkSettings.setObjectName("DxvkSettings")
|
||||||
|
self.gridLayout = QtWidgets.QGridLayout(DxvkSettings)
|
||||||
|
self.gridLayout.setObjectName("gridLayout")
|
||||||
|
self.gb_dxvk_options = QtWidgets.QGroupBox(DxvkSettings)
|
||||||
|
self.gb_dxvk_options.setObjectName("gb_dxvk_options")
|
||||||
|
self.layout_dxvk_options = QtWidgets.QGridLayout(self.gb_dxvk_options)
|
||||||
|
self.layout_dxvk_options.setObjectName("layout_dxvk_options")
|
||||||
|
self.version = QtWidgets.QCheckBox(self.gb_dxvk_options)
|
||||||
|
self.version.setObjectName("version")
|
||||||
|
self.layout_dxvk_options.addWidget(self.version, 0, 2, 1, 1)
|
||||||
|
self.fps = QtWidgets.QCheckBox(self.gb_dxvk_options)
|
||||||
|
self.fps.setObjectName("fps")
|
||||||
|
self.layout_dxvk_options.addWidget(self.fps, 1, 0, 1, 1)
|
||||||
|
self.memory = QtWidgets.QCheckBox(self.gb_dxvk_options)
|
||||||
|
self.memory.setObjectName("memory")
|
||||||
|
self.layout_dxvk_options.addWidget(self.memory, 0, 1, 1, 1)
|
||||||
|
self.devinfo = QtWidgets.QCheckBox(self.gb_dxvk_options)
|
||||||
|
self.devinfo.setObjectName("devinfo")
|
||||||
|
self.layout_dxvk_options.addWidget(self.devinfo, 0, 0, 1, 1)
|
||||||
|
self.gpuload = QtWidgets.QCheckBox(self.gb_dxvk_options)
|
||||||
|
self.gpuload.setObjectName("gpuload")
|
||||||
|
self.layout_dxvk_options.addWidget(self.gpuload, 1, 1, 1, 1)
|
||||||
|
self.frametime = QtWidgets.QCheckBox(self.gb_dxvk_options)
|
||||||
|
self.frametime.setObjectName("frametime")
|
||||||
|
self.layout_dxvk_options.addWidget(self.frametime, 2, 0, 1, 1)
|
||||||
|
spacerItem = QtWidgets.QSpacerItem(0, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
|
self.layout_dxvk_options.addItem(spacerItem, 0, 3, 3, 1)
|
||||||
|
self.api = QtWidgets.QCheckBox(self.gb_dxvk_options)
|
||||||
|
self.api.setObjectName("api")
|
||||||
|
self.layout_dxvk_options.addWidget(self.api, 1, 2, 1, 1)
|
||||||
|
self.gridLayout.addWidget(self.gb_dxvk_options, 2, 0, 1, 3)
|
||||||
|
self.lbl_show_dxvk = QtWidgets.QLabel(DxvkSettings)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.lbl_show_dxvk.sizePolicy().hasHeightForWidth())
|
||||||
|
self.lbl_show_dxvk.setSizePolicy(sizePolicy)
|
||||||
|
self.lbl_show_dxvk.setObjectName("lbl_show_dxvk")
|
||||||
|
self.gridLayout.addWidget(self.lbl_show_dxvk, 0, 0, 1, 1)
|
||||||
|
self.show_dxvk = QtWidgets.QComboBox(DxvkSettings)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.show_dxvk.sizePolicy().hasHeightForWidth())
|
||||||
|
self.show_dxvk.setSizePolicy(sizePolicy)
|
||||||
|
self.show_dxvk.setObjectName("show_dxvk")
|
||||||
|
self.show_dxvk.addItem("")
|
||||||
|
self.show_dxvk.addItem("")
|
||||||
|
self.show_dxvk.addItem("")
|
||||||
|
self.show_dxvk.addItem("")
|
||||||
|
self.gridLayout.addWidget(self.show_dxvk, 0, 1, 1, 2)
|
||||||
|
|
||||||
|
self.retranslateUi(DxvkSettings)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(DxvkSettings)
|
||||||
|
|
||||||
|
def retranslateUi(self, DxvkSettings):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
DxvkSettings.setWindowTitle(_translate("DxvkSettings", "DxvkSettings"))
|
||||||
|
DxvkSettings.setTitle(_translate("DxvkSettings", "DXVK Settings"))
|
||||||
|
self.gb_dxvk_options.setTitle(_translate("DxvkSettings", "DXVK HUD Options"))
|
||||||
|
self.version.setText(_translate("DxvkSettings", "DXVK Version"))
|
||||||
|
self.fps.setText(_translate("DxvkSettings", "FPS"))
|
||||||
|
self.memory.setText(_translate("DxvkSettings", "Memory Usage"))
|
||||||
|
self.devinfo.setText(_translate("DxvkSettings", "Device Info"))
|
||||||
|
self.gpuload.setText(_translate("DxvkSettings", "GPU Usage"))
|
||||||
|
self.frametime.setText(_translate("DxvkSettings", "Frame Time graph"))
|
||||||
|
self.api.setText(_translate("DxvkSettings", "D3D Version"))
|
||||||
|
self.lbl_show_dxvk.setText(_translate("DxvkSettings", "Show HUD"))
|
||||||
|
self.show_dxvk.setItemText(0, _translate("DxvkSettings", "System Default"))
|
||||||
|
self.show_dxvk.setItemText(1, _translate("DxvkSettings", "Hidden"))
|
||||||
|
self.show_dxvk.setItemText(2, _translate("DxvkSettings", "Visible"))
|
||||||
|
self.show_dxvk.setItemText(3, _translate("DxvkSettings", "Custom Options"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
DxvkSettings = QtWidgets.QGroupBox()
|
||||||
|
ui = Ui_DxvkSettings()
|
||||||
|
ui.setupUi(DxvkSettings)
|
||||||
|
DxvkSettings.show()
|
||||||
|
sys.exit(app.exec_())
|
138
rare/ui/components/tabs/settings/dxvk.ui
Normal file
138
rare/ui/components/tabs/settings/dxvk.ui
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>DxvkSettings</class>
|
||||||
|
<widget class="QGroupBox" name="DxvkSettings">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>419</width>
|
||||||
|
<height>185</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>DxvkSettings</string>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>DXVK Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="2" column="0" colspan="3">
|
||||||
|
<widget class="QGroupBox" name="gb_dxvk_options">
|
||||||
|
<property name="title">
|
||||||
|
<string>DXVK HUD Options</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="layout_dxvk_options">
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QCheckBox" name="version">
|
||||||
|
<property name="text">
|
||||||
|
<string>DXVK Version</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="fps">
|
||||||
|
<property name="text">
|
||||||
|
<string>FPS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="memory">
|
||||||
|
<property name="text">
|
||||||
|
<string>Memory Usage</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="devinfo">
|
||||||
|
<property name="text">
|
||||||
|
<string>Device Info</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="gpuload">
|
||||||
|
<property name="text">
|
||||||
|
<string>GPU Usage</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="frametime">
|
||||||
|
<property name="text">
|
||||||
|
<string>Frame Time graph</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3" rowspan="3">
|
||||||
|
<spacer name="hs_dxvk_options">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QCheckBox" name="api">
|
||||||
|
<property name="text">
|
||||||
|
<string>D3D Version</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_show_dxvk">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Show HUD</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="2">
|
||||||
|
<widget class="QComboBox" name="show_dxvk">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>System Default</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hidden</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Visible</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Custom Options</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
85
rare/ui/components/tabs/settings/legendary.py
Normal file
85
rare/ui/components/tabs/settings/legendary.py
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file '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, QtCore.Qt.AlignRight)
|
||||||
|
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_())
|
115
rare/ui/components/tabs/settings/legendary.ui
Normal file
115
rare/ui/components/tabs/settings/legendary.ui
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>LegendarySettings</class>
|
||||||
|
<widget class="QWidget" name="LegendarySettings">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>647</width>
|
||||||
|
<height>476</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>LegendarySettings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="layout_legendary">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="gb_install_dir">
|
||||||
|
<property name="title">
|
||||||
|
<string>Default Installation Directory</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="layout_install_dir"/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QGroupBox" name="gb_downloads">
|
||||||
|
<property name="title">
|
||||||
|
<string>Download Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="layout_downloads">
|
||||||
|
<item row="0" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lbl_max_workers">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Max Workers</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<spacer name="hs_downloads">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="max_worker_select"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="lbl_max_workers_info">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<italic>true</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Less is slower (0: Default)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<spacer name="vs_legendary">
|
||||||
|
<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="1">
|
||||||
|
<widget class="QGroupBox" name="gb_clean">
|
||||||
|
<property name="title">
|
||||||
|
<string>Cleanup</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="layout_clean">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="clean_button_without_manifests">
|
||||||
|
<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>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
71
rare/ui/components/tabs/settings/linux.py
Normal file
71
rare/ui/components/tabs/settings/linux.py
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'linux.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_LinuxSettings(object):
|
||||||
|
def setupUi(self, LinuxSettings):
|
||||||
|
LinuxSettings.setObjectName("LinuxSettings")
|
||||||
|
LinuxSettings.resize(569, 454)
|
||||||
|
self.linux_layout = QtWidgets.QGridLayout(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.QGridLayout(self.wine_groupbox)
|
||||||
|
self.wine_layout.setObjectName("wine_layout")
|
||||||
|
self.exec_label = QtWidgets.QLabel(self.wine_groupbox)
|
||||||
|
self.exec_label.setObjectName("exec_label")
|
||||||
|
self.wine_layout.addWidget(self.exec_label, 2, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.prefix_label = QtWidgets.QLabel(self.wine_groupbox)
|
||||||
|
self.prefix_label.setObjectName("prefix_label")
|
||||||
|
self.wine_layout.addWidget(self.prefix_label, 0, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.prefix_alignment_label = QtWidgets.QLabel(self.wine_groupbox)
|
||||||
|
self.prefix_alignment_label.setEnabled(False)
|
||||||
|
self.prefix_alignment_label.setText("")
|
||||||
|
self.prefix_alignment_label.setObjectName("prefix_alignment_label")
|
||||||
|
self.wine_layout.addWidget(self.prefix_alignment_label, 1, 0, 1, 1)
|
||||||
|
self.exec_alignment_label = QtWidgets.QLabel(self.wine_groupbox)
|
||||||
|
self.exec_alignment_label.setEnabled(False)
|
||||||
|
self.exec_alignment_label.setText("")
|
||||||
|
self.exec_alignment_label.setObjectName("exec_alignment_label")
|
||||||
|
self.wine_layout.addWidget(self.exec_alignment_label, 3, 0, 1, 1)
|
||||||
|
self.prefix_layout = QtWidgets.QVBoxLayout()
|
||||||
|
self.prefix_layout.setObjectName("prefix_layout")
|
||||||
|
self.wine_layout.addLayout(self.prefix_layout, 0, 1, 2, 1)
|
||||||
|
self.exec_layout = QtWidgets.QVBoxLayout()
|
||||||
|
self.exec_layout.setObjectName("exec_layout")
|
||||||
|
self.wine_layout.addLayout(self.exec_layout, 2, 1, 2, 1)
|
||||||
|
self.linux_layout.addWidget(self.wine_groupbox, 0, 0, 1, 1)
|
||||||
|
self.dxvk_layout = QtWidgets.QVBoxLayout()
|
||||||
|
self.dxvk_layout.setObjectName("dxvk_layout")
|
||||||
|
self.linux_layout.addLayout(self.dxvk_layout, 1, 0, 1, 1)
|
||||||
|
|
||||||
|
self.retranslateUi(LinuxSettings)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(LinuxSettings)
|
||||||
|
|
||||||
|
def retranslateUi(self, LinuxSettings):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
LinuxSettings.setWindowTitle(_translate("LinuxSettings", "LinuxSettings"))
|
||||||
|
self.wine_groupbox.setTitle(_translate("LinuxSettings", "Wine Settings"))
|
||||||
|
self.exec_label.setText(_translate("LinuxSettings", "Executable"))
|
||||||
|
self.prefix_label.setText(_translate("LinuxSettings", "Prefix"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
LinuxSettings = QtWidgets.QWidget()
|
||||||
|
ui = Ui_LinuxSettings()
|
||||||
|
ui.setupUi(LinuxSettings)
|
||||||
|
LinuxSettings.show()
|
||||||
|
sys.exit(app.exec_())
|
86
rare/ui/components/tabs/settings/linux.ui
Normal file
86
rare/ui/components/tabs/settings/linux.ui
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>LinuxSettings</class>
|
||||||
|
<widget class="QWidget" name="LinuxSettings">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>569</width>
|
||||||
|
<height>454</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<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">
|
||||||
|
<widget class="QGroupBox" name="wine_groupbox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Wine Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="wine_layout">
|
||||||
|
<item row="2" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="exec_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Executable</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="prefix_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Prefix</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="prefix_alignment_label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="exec_alignment_label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" rowspan="2">
|
||||||
|
<layout class="QVBoxLayout" name="prefix_layout"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" rowspan="2">
|
||||||
|
<layout class="QVBoxLayout" name="exec_layout"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<layout class="QVBoxLayout" name="dxvk_layout"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
141
rare/ui/components/tabs/settings/rare.py
Normal file
141
rare/ui/components/tabs/settings/rare.py
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'rare.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_RareSettings(object):
|
||||||
|
def setupUi(self, RareSettings):
|
||||||
|
RareSettings.setObjectName("RareSettings")
|
||||||
|
self.rare_layout = QtWidgets.QGridLayout(RareSettings)
|
||||||
|
self.rare_layout.setObjectName("rare_layout")
|
||||||
|
self.rpc_layout = QtWidgets.QVBoxLayout()
|
||||||
|
self.rpc_layout.setObjectName("rpc_layout")
|
||||||
|
self.rare_layout.addLayout(self.rpc_layout, 1, 2, 1, 1)
|
||||||
|
self.img_dir_group = QtWidgets.QGroupBox(RareSettings)
|
||||||
|
self.img_dir_group.setObjectName("img_dir_group")
|
||||||
|
self.img_dir_layout = QtWidgets.QVBoxLayout(self.img_dir_group)
|
||||||
|
self.img_dir_layout.setObjectName("img_dir_layout")
|
||||||
|
self.rare_layout.addWidget(self.img_dir_group, 0, 0, 1, 2, QtCore.Qt.AlignTop)
|
||||||
|
self.interface_group = QtWidgets.QGroupBox(RareSettings)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.interface_group.sizePolicy().hasHeightForWidth())
|
||||||
|
self.interface_group.setSizePolicy(sizePolicy)
|
||||||
|
self.interface_group.setObjectName("interface_group")
|
||||||
|
self.interface_layout = QtWidgets.QGridLayout(self.interface_group)
|
||||||
|
self.interface_layout.setObjectName("interface_layout")
|
||||||
|
self.lang_label = QtWidgets.QLabel(self.interface_group)
|
||||||
|
self.lang_label.setObjectName("lang_label")
|
||||||
|
self.interface_layout.addWidget(self.lang_label, 0, 1, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.style_label = QtWidgets.QLabel(self.interface_group)
|
||||||
|
self.style_label.setObjectName("style_label")
|
||||||
|
self.interface_layout.addWidget(self.style_label, 2, 1, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.color_label = QtWidgets.QLabel(self.interface_group)
|
||||||
|
self.color_label.setObjectName("color_label")
|
||||||
|
self.interface_layout.addWidget(self.color_label, 1, 1, 1, 1, QtCore.Qt.AlignRight)
|
||||||
|
self.lang_select = QtWidgets.QComboBox(self.interface_group)
|
||||||
|
self.lang_select.setObjectName("lang_select")
|
||||||
|
self.interface_layout.addWidget(self.lang_select, 0, 2, 1, 1)
|
||||||
|
self.interface_info = QtWidgets.QLabel(self.interface_group)
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setItalic(True)
|
||||||
|
self.interface_info.setFont(font)
|
||||||
|
self.interface_info.setWordWrap(True)
|
||||||
|
self.interface_info.setObjectName("interface_info")
|
||||||
|
self.interface_layout.addWidget(self.interface_info, 3, 0, 1, 4)
|
||||||
|
self.style_select = QtWidgets.QComboBox(self.interface_group)
|
||||||
|
self.style_select.setObjectName("style_select")
|
||||||
|
self.style_select.addItem("")
|
||||||
|
self.interface_layout.addWidget(self.style_select, 2, 2, 1, 1)
|
||||||
|
self.color_select = QtWidgets.QComboBox(self.interface_group)
|
||||||
|
self.color_select.setObjectName("color_select")
|
||||||
|
self.color_select.addItem("")
|
||||||
|
self.interface_layout.addWidget(self.color_select, 1, 2, 1, 1)
|
||||||
|
self.rare_layout.addWidget(self.interface_group, 1, 0, 1, 1, QtCore.Qt.AlignTop)
|
||||||
|
self.settings_group = QtWidgets.QGroupBox(RareSettings)
|
||||||
|
self.settings_group.setObjectName("settings_group")
|
||||||
|
self.behaviour_layout = QtWidgets.QGridLayout(self.settings_group)
|
||||||
|
self.behaviour_layout.setObjectName("behaviour_layout")
|
||||||
|
self.auto_sync_cloud = QtWidgets.QCheckBox(self.settings_group)
|
||||||
|
self.auto_sync_cloud.setObjectName("auto_sync_cloud")
|
||||||
|
self.behaviour_layout.addWidget(self.auto_sync_cloud, 3, 0, 1, 1)
|
||||||
|
self.auto_update = QtWidgets.QCheckBox(self.settings_group)
|
||||||
|
self.auto_update.setObjectName("auto_update")
|
||||||
|
self.behaviour_layout.addWidget(self.auto_update, 1, 0, 1, 1)
|
||||||
|
self.confirm_start = QtWidgets.QCheckBox(self.settings_group)
|
||||||
|
self.confirm_start.setObjectName("confirm_start")
|
||||||
|
self.behaviour_layout.addWidget(self.confirm_start, 2, 0, 1, 1)
|
||||||
|
self.sys_tray = QtWidgets.QCheckBox(self.settings_group)
|
||||||
|
self.sys_tray.setObjectName("sys_tray")
|
||||||
|
self.behaviour_layout.addWidget(self.sys_tray, 0, 0, 1, 1)
|
||||||
|
spacerItem = QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
|
self.behaviour_layout.addItem(spacerItem, 0, 2, 4, 1)
|
||||||
|
self.notification = QtWidgets.QCheckBox(self.settings_group)
|
||||||
|
self.notification.setObjectName("notification")
|
||||||
|
self.behaviour_layout.addWidget(self.notification, 0, 1, 1, 1)
|
||||||
|
self.save_size = QtWidgets.QCheckBox(self.settings_group)
|
||||||
|
self.save_size.setObjectName("save_size")
|
||||||
|
self.behaviour_layout.addWidget(self.save_size, 1, 1, 1, 1)
|
||||||
|
self.rare_layout.addWidget(self.settings_group, 1, 1, 1, 1, QtCore.Qt.AlignTop)
|
||||||
|
self.log_dir_group = QtWidgets.QGroupBox(RareSettings)
|
||||||
|
self.log_dir_group.setObjectName("log_dir_group")
|
||||||
|
self.log_dir_layout = QtWidgets.QVBoxLayout(self.log_dir_group)
|
||||||
|
self.log_dir_layout.setObjectName("log_dir_layout")
|
||||||
|
self.log_dir_open_button = QtWidgets.QPushButton(self.log_dir_group)
|
||||||
|
self.log_dir_open_button.setObjectName("log_dir_open_button")
|
||||||
|
self.log_dir_layout.addWidget(self.log_dir_open_button)
|
||||||
|
self.log_dir_clean_button = QtWidgets.QPushButton(self.log_dir_group)
|
||||||
|
self.log_dir_clean_button.setObjectName("log_dir_clean_button")
|
||||||
|
self.log_dir_layout.addWidget(self.log_dir_clean_button)
|
||||||
|
self.log_dir_size_label = QtWidgets.QLabel(self.log_dir_group)
|
||||||
|
self.log_dir_size_label.setText("")
|
||||||
|
self.log_dir_size_label.setWordWrap(True)
|
||||||
|
self.log_dir_size_label.setObjectName("log_dir_size_label")
|
||||||
|
self.log_dir_layout.addWidget(self.log_dir_size_label)
|
||||||
|
self.rare_layout.addWidget(self.log_dir_group, 0, 2, 1, 1, QtCore.Qt.AlignTop)
|
||||||
|
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||||
|
self.rare_layout.addItem(spacerItem1, 2, 1, 1, 1)
|
||||||
|
|
||||||
|
self.retranslateUi(RareSettings)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(RareSettings)
|
||||||
|
|
||||||
|
def retranslateUi(self, RareSettings):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
RareSettings.setWindowTitle(_translate("RareSettings", "RareSettings"))
|
||||||
|
self.img_dir_group.setTitle(_translate("RareSettings", "Image Cache Directory"))
|
||||||
|
self.interface_group.setTitle(_translate("RareSettings", "Interface"))
|
||||||
|
self.lang_label.setText(_translate("RareSettings", "Language"))
|
||||||
|
self.style_label.setText(_translate("RareSettings", "Style Sheet"))
|
||||||
|
self.color_label.setText(_translate("RareSettings", "Color Scheme"))
|
||||||
|
self.interface_info.setText(_translate("RareSettings", "Restart Rare to apply."))
|
||||||
|
self.style_select.setItemText(0, _translate("RareSettings", "None"))
|
||||||
|
self.color_select.setItemText(0, _translate("RareSettings", "None"))
|
||||||
|
self.settings_group.setTitle(_translate("RareSettings", "Behaviour"))
|
||||||
|
self.auto_sync_cloud.setText(_translate("RareSettings", "Automatically sync with cloud"))
|
||||||
|
self.auto_update.setText(_translate("RareSettings", "Update games on application startup"))
|
||||||
|
self.confirm_start.setText(_translate("RareSettings", "Confirm game launch"))
|
||||||
|
self.sys_tray.setText(_translate("RareSettings", "Exit to System tray"))
|
||||||
|
self.notification.setText(_translate("RareSettings", "Show notification on download completion"))
|
||||||
|
self.save_size.setText(_translate("RareSettings", "Restore window size on application startup"))
|
||||||
|
self.log_dir_group.setTitle(_translate("RareSettings", "Logs"))
|
||||||
|
self.log_dir_open_button.setText(_translate("RareSettings", "Open Log directory"))
|
||||||
|
self.log_dir_clean_button.setText(_translate("RareSettings", "Clean Log directory"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
RareSettings = QtWidgets.QWidget()
|
||||||
|
ui = Ui_RareSettings()
|
||||||
|
ui.setupUi(RareSettings)
|
||||||
|
RareSettings.show()
|
||||||
|
sys.exit(app.exec_())
|
206
rare/ui/components/tabs/settings/rare.ui
Normal file
206
rare/ui/components/tabs/settings/rare.ui
Normal file
|
@ -0,0 +1,206 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RareSettings</class>
|
||||||
|
<widget class="QWidget" name="RareSettings">
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>RareSettings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="rare_layout">
|
||||||
|
<item row="1" column="2">
|
||||||
|
<layout class="QVBoxLayout" name="rpc_layout"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2" alignment="Qt::AlignTop">
|
||||||
|
<widget class="QGroupBox" name="img_dir_group">
|
||||||
|
<property name="title">
|
||||||
|
<string>Image Cache Directory</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="img_dir_layout"/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" alignment="Qt::AlignTop">
|
||||||
|
<widget class="QGroupBox" name="interface_group">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Interface</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="interface_layout">
|
||||||
|
<item row="0" column="1" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="lang_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Language</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="style_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Style Sheet</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" alignment="Qt::AlignRight">
|
||||||
|
<widget class="QLabel" name="color_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Color Scheme</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QComboBox" name="lang_select"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="4">
|
||||||
|
<widget class="QLabel" name="interface_info">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<italic>true</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Restart Rare to apply.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QComboBox" name="style_select">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QComboBox" name="color_select">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>None</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" alignment="Qt::AlignTop">
|
||||||
|
<widget class="QGroupBox" name="settings_group">
|
||||||
|
<property name="title">
|
||||||
|
<string>Behaviour</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="behaviour_layout">
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="auto_sync_cloud">
|
||||||
|
<property name="text">
|
||||||
|
<string>Automatically sync with cloud</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="auto_update">
|
||||||
|
<property name="text">
|
||||||
|
<string>Update games on application startup</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="confirm_start">
|
||||||
|
<property name="text">
|
||||||
|
<string>Confirm game launch</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="sys_tray">
|
||||||
|
<property name="text">
|
||||||
|
<string>Exit to System tray</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" rowspan="4">
|
||||||
|
<spacer name="settings_hspacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="notification">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show notification on download completion</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="save_size">
|
||||||
|
<property name="text">
|
||||||
|
<string>Restore window size on application startup</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" alignment="Qt::AlignTop">
|
||||||
|
<widget class="QGroupBox" name="log_dir_group">
|
||||||
|
<property name="title">
|
||||||
|
<string>Logs</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="log_dir_layout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="log_dir_open_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Log directory</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="log_dir_clean_button">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clean Log directory</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="log_dir_size_label">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<spacer name="rare_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/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
66
rare/ui/components/tabs/settings/rpc_settings.py
Normal file
66
rare/ui/components/tabs/settings/rpc_settings.py
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'rpc_settings.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_RPCSettings(object):
|
||||||
|
def setupUi(self, RPCSettings):
|
||||||
|
RPCSettings.setObjectName("RPCSettings")
|
||||||
|
self.gridLayout = QtWidgets.QGridLayout(RPCSettings)
|
||||||
|
self.gridLayout.setObjectName("gridLayout")
|
||||||
|
self.enable = QtWidgets.QComboBox(RPCSettings)
|
||||||
|
self.enable.setObjectName("enable")
|
||||||
|
self.enable.addItem("")
|
||||||
|
self.enable.addItem("")
|
||||||
|
self.enable.addItem("")
|
||||||
|
self.gridLayout.addWidget(self.enable, 0, 1, 1, 1)
|
||||||
|
self.label = QtWidgets.QLabel(RPCSettings)
|
||||||
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
|
||||||
|
self.label.setSizePolicy(sizePolicy)
|
||||||
|
self.label.setObjectName("label")
|
||||||
|
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
|
||||||
|
self.show_game = QtWidgets.QCheckBox(RPCSettings)
|
||||||
|
self.show_game.setObjectName("show_game")
|
||||||
|
self.gridLayout.addWidget(self.show_game, 1, 0, 1, 2)
|
||||||
|
self.show_os = QtWidgets.QCheckBox(RPCSettings)
|
||||||
|
self.show_os.setObjectName("show_os")
|
||||||
|
self.gridLayout.addWidget(self.show_os, 2, 0, 1, 2)
|
||||||
|
self.show_time = QtWidgets.QCheckBox(RPCSettings)
|
||||||
|
self.show_time.setObjectName("show_time")
|
||||||
|
self.gridLayout.addWidget(self.show_time, 3, 0, 1, 2)
|
||||||
|
|
||||||
|
self.retranslateUi(RPCSettings)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(RPCSettings)
|
||||||
|
|
||||||
|
def retranslateUi(self, RPCSettings):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
RPCSettings.setWindowTitle(_translate("RPCSettings", "Discord RPC"))
|
||||||
|
RPCSettings.setTitle(_translate("RPCSettings", "Discord RPC"))
|
||||||
|
self.enable.setItemText(0, _translate("RPCSettings", "When Playing"))
|
||||||
|
self.enable.setItemText(1, _translate("RPCSettings", "Always"))
|
||||||
|
self.enable.setItemText(2, _translate("RPCSettings", "Never"))
|
||||||
|
self.label.setText(_translate("RPCSettings", "Show"))
|
||||||
|
self.show_game.setText(_translate("RPCSettings", "Show Game"))
|
||||||
|
self.show_os.setText(_translate("RPCSettings", "Show OS"))
|
||||||
|
self.show_time.setText(_translate("RPCSettings", "Show Time playing"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
RPCSettings = QtWidgets.QGroupBox()
|
||||||
|
ui = Ui_RPCSettings()
|
||||||
|
ui.setupUi(RPCSettings)
|
||||||
|
RPCSettings.show()
|
||||||
|
sys.exit(app.exec_())
|
69
rare/ui/components/tabs/settings/rpc_settings.ui
Normal file
69
rare/ui/components/tabs/settings/rpc_settings.ui
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RPCSettings</class>
|
||||||
|
<widget class="QGroupBox" name="RPCSettings">
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Discord RPC</string>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Discord RPC</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="enable">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>When Playing</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Always</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Never</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Show</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="show_game">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Game</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="show_os">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show OS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="show_time">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Time playing</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
55
rare/ui/utils/pathedit.py
Normal file
55
rare/ui/utils/pathedit.py
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'pathedit.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_PathEdit(object):
|
||||||
|
def setupUi(self, PathEdit):
|
||||||
|
PathEdit.setObjectName("PathEdit")
|
||||||
|
self.layout_pathedit = QtWidgets.QGridLayout(PathEdit)
|
||||||
|
self.layout_pathedit.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.layout_pathedit.setObjectName("layout_pathedit")
|
||||||
|
self.path_select = QtWidgets.QToolButton(PathEdit)
|
||||||
|
self.path_select.setObjectName("path_select")
|
||||||
|
self.layout_pathedit.addWidget(self.path_select, 0, 1, 1, 1)
|
||||||
|
self.text_edit = QtWidgets.QLineEdit(PathEdit)
|
||||||
|
self.text_edit.setMinimumSize(QtCore.QSize(300, 0))
|
||||||
|
self.text_edit.setObjectName("text_edit")
|
||||||
|
self.layout_pathedit.addWidget(self.text_edit, 0, 0, 1, 1)
|
||||||
|
self.layout_pathedit_save = QtWidgets.QHBoxLayout()
|
||||||
|
self.layout_pathedit_save.setObjectName("layout_pathedit_save")
|
||||||
|
spacerItem = QtWidgets.QSpacerItem(40, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
|
self.layout_pathedit_save.addItem(spacerItem)
|
||||||
|
self.save_path_button = QtWidgets.QPushButton(PathEdit)
|
||||||
|
self.save_path_button.setEnabled(True)
|
||||||
|
self.save_path_button.setObjectName("save_path_button")
|
||||||
|
self.layout_pathedit_save.addWidget(self.save_path_button)
|
||||||
|
self.layout_pathedit.addLayout(self.layout_pathedit_save, 1, 0, 1, 2)
|
||||||
|
|
||||||
|
self.retranslateUi(PathEdit)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(PathEdit)
|
||||||
|
|
||||||
|
def retranslateUi(self, PathEdit):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
PathEdit.setWindowTitle(_translate("PathEdit", "PathEdit"))
|
||||||
|
self.path_select.setText(_translate("PathEdit", "Browse..."))
|
||||||
|
self.text_edit.setPlaceholderText(_translate("PathEdit", "Default"))
|
||||||
|
self.save_path_button.setText(_translate("PathEdit", "Save"))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
PathEdit = QtWidgets.QWidget()
|
||||||
|
ui = Ui_PathEdit()
|
||||||
|
ui.setupUi(PathEdit)
|
||||||
|
PathEdit.show()
|
||||||
|
sys.exit(app.exec_())
|
72
rare/ui/utils/pathedit.ui
Normal file
72
rare/ui/utils/pathedit.ui
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>PathEdit</class>
|
||||||
|
<widget class="QWidget" name="PathEdit">
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>PathEdit</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="layout_pathedit">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QToolButton" name="path_select">
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLineEdit" name="text_edit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="layout_pathedit_save">
|
||||||
|
<item>
|
||||||
|
<spacer name="hs_save">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="save_path_button">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Save</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -2,11 +2,12 @@ import os
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt, QRect, QSize, QPoint, pyqtSignal
|
from PyQt5.QtCore import Qt, QRect, QSize, QPoint, pyqtSignal
|
||||||
from PyQt5.QtGui import QMovie
|
from PyQt5.QtGui import QMovie
|
||||||
from PyQt5.QtWidgets import QLayout, QStyle, QSizePolicy, QLabel, QFileDialog, QHBoxLayout, QWidget, QLineEdit, \
|
from PyQt5.QtWidgets import QLayout, QStyle, QSizePolicy, QLabel, QFileDialog, QHBoxLayout, QWidget, QPushButton, \
|
||||||
QPushButton, QStyleOptionTab, QStylePainter, QTabBar
|
QStyleOptionTab, QStylePainter, QTabBar
|
||||||
from qtawesome import icon
|
from qtawesome import icon
|
||||||
|
|
||||||
from rare import style_path
|
from rare import style_path
|
||||||
|
from rare.ui.utils.pathedit import Ui_PathEdit
|
||||||
|
|
||||||
|
|
||||||
class FlowLayout(QLayout):
|
class FlowLayout(QLayout):
|
||||||
|
@ -120,33 +121,51 @@ class ClickableLabel(QLabel):
|
||||||
super(ClickableLabel, self).__init__()
|
super(ClickableLabel, self).__init__()
|
||||||
|
|
||||||
|
|
||||||
class PathEdit(QWidget):
|
class PathEdit(QWidget, Ui_PathEdit):
|
||||||
def __init__(self, text: str = "",
|
def __init__(self,
|
||||||
type_of_file: QFileDialog.FileType = QFileDialog.AnyFile,
|
text: str = "",
|
||||||
infotext: str = "", filter: str = None):
|
file_type: QFileDialog.FileType = QFileDialog.AnyFile,
|
||||||
|
type_filter: str = None,
|
||||||
|
name_filter: str = None,
|
||||||
|
edit_func: callable = None,
|
||||||
|
save_func: callable = None):
|
||||||
super(PathEdit, self).__init__()
|
super(PathEdit, self).__init__()
|
||||||
self.filter = filter
|
self.setupUi(self)
|
||||||
self.type_of_file = type_of_file
|
|
||||||
self.info_text = infotext
|
|
||||||
self.layout = QHBoxLayout()
|
|
||||||
self.text_edit = QLineEdit(text)
|
|
||||||
self.path_select = QPushButton(self.tr("Select Path"))
|
|
||||||
self.path_select.clicked.connect(self.set_path)
|
|
||||||
self.layout.addWidget(self.text_edit)
|
|
||||||
self.layout.addWidget(self.path_select)
|
|
||||||
self.setLayout(self.layout)
|
|
||||||
|
|
||||||
def setPlaceholderText(self, text: str):
|
self.type_filter = type_filter
|
||||||
self.text_edit.setPlaceholderText(text)
|
self.name_filter = name_filter
|
||||||
|
self.file_type = file_type
|
||||||
|
self.edit_func = edit_func
|
||||||
|
self.save_func = save_func
|
||||||
|
if text:
|
||||||
|
self.text_edit.setText(text)
|
||||||
|
if self.edit_func is not None:
|
||||||
|
self.text_edit.textChanged.connect(self.edit_func)
|
||||||
|
if self.save_func is None:
|
||||||
|
self.save_path_button.setVisible(False)
|
||||||
|
else:
|
||||||
|
self.text_edit.textChanged.connect(lambda t: self.save_path_button.setDisabled(False))
|
||||||
|
self.save_path_button.clicked.connect(self.save)
|
||||||
|
self.save_path_button.setDisabled(True)
|
||||||
|
self.path_select.clicked.connect(self.set_path)
|
||||||
|
|
||||||
def text(self):
|
def text(self):
|
||||||
return self.text_edit.text()
|
return self.text_edit.text()
|
||||||
|
|
||||||
|
def save(self):
|
||||||
|
self.save_func()
|
||||||
|
self.save_path_button.setDisabled(True)
|
||||||
|
|
||||||
def set_path(self):
|
def set_path(self):
|
||||||
dlg = QFileDialog(self, self.tr("Choose Path"), os.path.expanduser("~/"))
|
dlg_path = self.text_edit.text()
|
||||||
dlg.setFileMode(self.type_of_file)
|
if not dlg_path:
|
||||||
if self.filter:
|
dlg_path = os.path.expanduser("~/")
|
||||||
dlg.setFilter([self.filter])
|
dlg = QFileDialog(self, self.tr("Choose Path"), dlg_path)
|
||||||
|
dlg.setFileMode(self.file_type)
|
||||||
|
if self.type_filter:
|
||||||
|
dlg.setFilter([self.type_filter])
|
||||||
|
if self.name_filter:
|
||||||
|
dlg.setNameFilter(self.name_filter)
|
||||||
if dlg.exec_():
|
if dlg.exec_():
|
||||||
names = dlg.selectedFiles()
|
names = dlg.selectedFiles()
|
||||||
self.text_edit.setText(names[0])
|
self.text_edit.setText(names[0])
|
||||||
|
|
|
@ -7,6 +7,8 @@ from logging import getLogger
|
||||||
import requests
|
import requests
|
||||||
from PIL import Image, UnidentifiedImageError
|
from PIL import Image, UnidentifiedImageError
|
||||||
from PyQt5.QtCore import pyqtSignal, QLocale, QSettings
|
from PyQt5.QtCore import pyqtSignal, QLocale, QSettings
|
||||||
|
from PyQt5.QtGui import QPalette, QColor
|
||||||
|
from rare import style_path
|
||||||
|
|
||||||
from rare.utils.id import upgrade_content, check_time, download_ids
|
from rare.utils.id import upgrade_content, check_time, download_ids
|
||||||
|
|
||||||
|
@ -139,6 +141,77 @@ def get_lang():
|
||||||
return QLocale.system().name().split("_")[0]
|
return QLocale.system().name().split("_")[0]
|
||||||
|
|
||||||
|
|
||||||
|
color_role_map = {
|
||||||
|
0: "WindowText",
|
||||||
|
1: "Button",
|
||||||
|
2: "Light",
|
||||||
|
3: "Midlight",
|
||||||
|
4: "Dark",
|
||||||
|
5: "Mid",
|
||||||
|
6: "Text",
|
||||||
|
7: "BrightText",
|
||||||
|
8: "ButtonText",
|
||||||
|
9: "Base",
|
||||||
|
10: "Window",
|
||||||
|
11: "Shadow",
|
||||||
|
12: "Highlight",
|
||||||
|
13: "HighlightedText",
|
||||||
|
14: "Link",
|
||||||
|
15: "LinkVisited",
|
||||||
|
16: "AlternateBase",
|
||||||
|
# 17: "NoRole",
|
||||||
|
18: "ToolTipBase",
|
||||||
|
19: "ToolTipText",
|
||||||
|
20: "PlaceholderText",
|
||||||
|
# 21: "NColorRoles",
|
||||||
|
}
|
||||||
|
|
||||||
|
color_group_map = {
|
||||||
|
0: "Active",
|
||||||
|
1: "Disabled",
|
||||||
|
2: "Inactive",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def load_color_scheme(path: str):
|
||||||
|
custom_palette = QPalette()
|
||||||
|
settings = QSettings(path, QSettings.IniFormat)
|
||||||
|
try:
|
||||||
|
settings.beginGroup("ColorScheme")
|
||||||
|
for g in color_group_map:
|
||||||
|
settings.beginGroup(color_group_map[g])
|
||||||
|
group = QPalette.ColorGroup(g)
|
||||||
|
for r in color_role_map:
|
||||||
|
role = QPalette.ColorRole(r)
|
||||||
|
custom_palette.setColor(group, role, QColor(settings.value(color_role_map[r])))
|
||||||
|
settings.endGroup()
|
||||||
|
settings.endGroup()
|
||||||
|
text_color = custom_palette.text().color()
|
||||||
|
text_color.setAlpha(128)
|
||||||
|
custom_palette.setColor(custom_palette.Active, custom_palette.PlaceholderText, text_color)
|
||||||
|
custom_palette.setColor(custom_palette.Inactive, custom_palette.PlaceholderText, text_color)
|
||||||
|
custom_palette.setColor(custom_palette.Disabled, custom_palette.PlaceholderText, text_color)
|
||||||
|
except:
|
||||||
|
custom_palette = None
|
||||||
|
return custom_palette
|
||||||
|
|
||||||
|
|
||||||
|
def get_color_schemes():
|
||||||
|
colors = []
|
||||||
|
for file in os.listdir(os.path.join(style_path, "colors")):
|
||||||
|
if file.endswith(".scheme") and os.path.isfile(os.path.join(style_path, "colors", file)):
|
||||||
|
colors.append(file.replace(".scheme", ""))
|
||||||
|
return colors
|
||||||
|
|
||||||
|
|
||||||
|
def get_style_sheets():
|
||||||
|
styles = []
|
||||||
|
for file in os.listdir(os.path.join(style_path, "qss")):
|
||||||
|
if file.endswith(".qss") and os.path.isfile(os.path.join(style_path, "qss", file)):
|
||||||
|
styles.append(file.replace(".qss", ""))
|
||||||
|
return styles
|
||||||
|
|
||||||
|
|
||||||
def get_possible_langs():
|
def get_possible_langs():
|
||||||
langs = ["en"]
|
langs = ["en"]
|
||||||
for i in os.listdir(lang_path):
|
for i in os.listdir(lang_path):
|
||||||
|
|
Loading…
Reference in a new issue