GameSettings: Use a PathEdit
for override_exe
In the process convert to Ui membership instead of dual sub-classing for those forms
This commit is contained in:
parent
44590bb92b
commit
ae74d3438b
|
@ -1,8 +1,10 @@
|
|||
import os.path
|
||||
import platform
|
||||
from logging import getLogger
|
||||
from typing import Tuple
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QLabel
|
||||
from PyQt5.QtWidgets import QLabel, QFileDialog
|
||||
from legendary.models.game import Game, InstalledGame
|
||||
|
||||
from rare.components.tabs.settings import DefaultGameSettings
|
||||
|
@ -10,44 +12,80 @@ from rare.components.tabs.settings.widgets.pre_launch import PreLaunchSettings
|
|||
from rare.models.game import RareGame
|
||||
from rare.utils import config_helper
|
||||
from rare.widgets.side_tab import SideTabContents
|
||||
from rare.widgets.indicator_edit import PathEdit, IndicatorReasonsCommon
|
||||
|
||||
logger = getLogger("GameSettings")
|
||||
|
||||
|
||||
class GameSettings(DefaultGameSettings, SideTabContents):
|
||||
game: Game
|
||||
igame: InstalledGame
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(GameSettings, self).__init__(False, parent=parent)
|
||||
self.pre_launch_settings = PreLaunchSettings()
|
||||
self.launch_settings_group.layout().addRow(
|
||||
self.ui.launch_settings_group.layout().addRow(
|
||||
QLabel(self.tr("Pre-launch command")), self.pre_launch_settings
|
||||
)
|
||||
|
||||
self.offline.currentIndexChanged.connect(lambda x: self.update_combobox(x, "offline"))
|
||||
self.skip_update.currentIndexChanged.connect(lambda x: self.update_combobox(x, "skip_update_check"))
|
||||
self.ui.skip_update.currentIndexChanged.connect(
|
||||
lambda x: self.update_combobox("skip_update_check", x)
|
||||
)
|
||||
self.ui.offline.currentIndexChanged.connect(
|
||||
lambda x: self.update_combobox("offline", x)
|
||||
)
|
||||
self.ui.launch_params.textChanged.connect(
|
||||
lambda x: self.line_edit_save_callback("start_params", x)
|
||||
)
|
||||
|
||||
self.override_exe_edit.textChanged.connect(lambda text: self.save_line_edit("override_exe", text))
|
||||
self.launch_params.textChanged.connect(lambda x: self.save_line_edit("start_params", x))
|
||||
self.override_exe_edit = PathEdit(
|
||||
file_mode=QFileDialog.ExistingFile,
|
||||
name_filters=["*.exe", "*.app"],
|
||||
placeholder=self.tr("Relative path to launch executable"),
|
||||
edit_func=self.override_exe_edit_callback,
|
||||
save_func=self.override_exe_save_callback,
|
||||
parent=self
|
||||
)
|
||||
self.ui.launch_settings_layout.insertRow(
|
||||
int(self.ui.launch_settings_layout.indexOf(self.ui.launch_params)/2) + 1,
|
||||
QLabel(self.tr("Override executable"), self),
|
||||
self.override_exe_edit
|
||||
)
|
||||
|
||||
self.game_settings_layout.setAlignment(Qt.AlignTop)
|
||||
self.ui.game_settings_layout.setAlignment(Qt.AlignTop)
|
||||
|
||||
def save_line_edit(self, option, value):
|
||||
self.game: Game = None
|
||||
self.igame: InstalledGame = None
|
||||
|
||||
def override_exe_edit_callback(self, path: str) -> Tuple[bool, str, int]:
|
||||
if not path:
|
||||
return True, path, IndicatorReasonsCommon.VALID
|
||||
if not os.path.isabs(path):
|
||||
path = os.path.join(self.igame.install_path, path)
|
||||
if self.igame.install_path not in path:
|
||||
return False, self.igame.install_path, IndicatorReasonsCommon.WRONG_PATH
|
||||
if not os.path.exists(path):
|
||||
return False, path, IndicatorReasonsCommon.WRONG_PATH
|
||||
|
||||
if not path.endswith(".exe") and not path.endswith(".app"):
|
||||
return False, path, IndicatorReasonsCommon.WRONG_PATH
|
||||
path = os.path.relpath(path, self.igame.install_path)
|
||||
return True, path, IndicatorReasonsCommon.VALID
|
||||
|
||||
def override_exe_save_callback(self, path: str):
|
||||
self.line_edit_save_callback("override_exe", path)
|
||||
|
||||
def line_edit_save_callback(self, option, value) -> None:
|
||||
if value:
|
||||
|
||||
config_helper.add_option(self.game.app_name, option, value)
|
||||
else:
|
||||
config_helper.remove_option(self.game.app_name, option)
|
||||
config_helper.save_config()
|
||||
|
||||
def update_combobox(self, i, option):
|
||||
def update_combobox(self, option, index):
|
||||
if self.change:
|
||||
# remove section
|
||||
if i:
|
||||
if i == 1:
|
||||
if index:
|
||||
if index == 1:
|
||||
config_helper.add_option(self.game.app_name, option, "true")
|
||||
if i == 2:
|
||||
if index == 2:
|
||||
config_helper.add_option(self.game.app_name, option, "false")
|
||||
else:
|
||||
config_helper.remove_option(self.game.app_name, option)
|
||||
|
@ -64,38 +102,39 @@ class GameSettings(DefaultGameSettings, SideTabContents):
|
|||
if self.igame.can_run_offline:
|
||||
offline = self.core.lgd.config.get(self.game.app_name, "offline", fallback="unset")
|
||||
if offline == "true":
|
||||
self.offline.setCurrentIndex(1)
|
||||
self.ui.offline.setCurrentIndex(1)
|
||||
elif offline == "false":
|
||||
self.offline.setCurrentIndex(2)
|
||||
self.ui.offline.setCurrentIndex(2)
|
||||
else:
|
||||
self.offline.setCurrentIndex(0)
|
||||
self.ui.offline.setCurrentIndex(0)
|
||||
|
||||
self.offline.setEnabled(True)
|
||||
self.ui.offline.setEnabled(True)
|
||||
else:
|
||||
self.offline.setEnabled(False)
|
||||
self.ui.offline.setEnabled(False)
|
||||
self.override_exe_edit.set_root(self.igame.install_path)
|
||||
else:
|
||||
self.offline.setEnabled(False)
|
||||
self.ui.offline.setEnabled(False)
|
||||
self.override_exe_edit.set_root("")
|
||||
|
||||
skip_update = self.core.lgd.config.get(self.game.app_name, "skip_update_check", fallback="unset")
|
||||
if skip_update == "true":
|
||||
self.skip_update.setCurrentIndex(1)
|
||||
self.ui.skip_update.setCurrentIndex(1)
|
||||
elif skip_update == "false":
|
||||
self.skip_update.setCurrentIndex(2)
|
||||
self.ui.skip_update.setCurrentIndex(2)
|
||||
else:
|
||||
self.skip_update.setCurrentIndex(0)
|
||||
self.ui.skip_update.setCurrentIndex(0)
|
||||
|
||||
self.set_title.emit(self.game.app_title)
|
||||
if platform.system() != "Windows":
|
||||
if self.igame and self.igame.platform == "Mac":
|
||||
self.linux_settings_widget.setVisible(False)
|
||||
self.ui.linux_settings_widget.setVisible(False)
|
||||
else:
|
||||
self.linux_settings_widget.setVisible(True)
|
||||
self.ui.linux_settings_widget.setVisible(True)
|
||||
|
||||
self.launch_params.setText(self.core.lgd.config.get(self.game.app_name, "start_params", fallback=""))
|
||||
self.ui.launch_params.setText(self.core.lgd.config.get(self.game.app_name, "start_params", fallback=""))
|
||||
self.override_exe_edit.setText(
|
||||
self.core.lgd.config.get(self.game.app_name, "override_exe", fallback="")
|
||||
)
|
||||
|
||||
self.pre_launch_settings.load_settings(app_name)
|
||||
|
||||
self.change = True
|
||||
|
|
|
@ -12,85 +12,61 @@ from rare.components.tabs.settings.widgets.linux import LinuxSettings
|
|||
from rare.components.tabs.settings.widgets.proton import ProtonSettings
|
||||
from rare.components.tabs.settings.widgets.wrapper import WrapperSettings
|
||||
from rare.shared import LegendaryCoreSingleton
|
||||
from rare.ui.components.tabs.games.game_info.game_settings import Ui_GameSettings
|
||||
from rare.utils import config_helper
|
||||
from rare.ui.components.tabs.settings.game_settings import Ui_GameSettings
|
||||
|
||||
logger = getLogger("GameSettings")
|
||||
|
||||
|
||||
class DefaultGameSettings(QWidget, Ui_GameSettings):
|
||||
class DefaultGameSettings(QWidget):
|
||||
# variable to no update when changing game
|
||||
change = False
|
||||
app_name: str
|
||||
|
||||
def __init__(self, is_default, parent=None):
|
||||
super(DefaultGameSettings, self).__init__(parent=parent)
|
||||
self.setupUi(self)
|
||||
self.ui = Ui_GameSettings()
|
||||
self.ui.setupUi(self)
|
||||
self.core = LegendaryCoreSingleton()
|
||||
self.settings = QSettings()
|
||||
|
||||
self.wrapper_settings = WrapperSettings()
|
||||
|
||||
self.launch_settings_group.layout().addRow(
|
||||
self.ui.launch_settings_group.layout().addRow(
|
||||
QLabel("Wrapper"), self.wrapper_settings
|
||||
)
|
||||
|
||||
if platform.system() != "Windows":
|
||||
self.linux_settings = LinuxAppSettings()
|
||||
self.proton_settings = ProtonSettings(self.linux_settings, self.wrapper_settings)
|
||||
self.proton_layout.addWidget(self.proton_settings)
|
||||
self.ui.proton_layout.addWidget(self.proton_settings)
|
||||
|
||||
# FIXME: Remove the spacerItem and margins from the linux settings
|
||||
# FIXME: This should be handled differently at soem point in the future
|
||||
# NOTE: specerItem has been removed
|
||||
self.linux_settings.layout().setContentsMargins(0, 0, 0, 0)
|
||||
for item in [
|
||||
self.linux_settings.layout().itemAt(idx)
|
||||
for idx in range(self.linux_settings.layout().count())
|
||||
]:
|
||||
if item.spacerItem():
|
||||
self.linux_settings.layout().removeItem(item)
|
||||
del item
|
||||
# FIXME: End of FIXME
|
||||
self.linux_settings_layout.addWidget(self.linux_settings)
|
||||
self.linux_settings_layout.setAlignment(Qt.AlignTop)
|
||||
self.ui.linux_settings_layout.addWidget(self.linux_settings)
|
||||
self.ui.linux_settings_layout.setAlignment(Qt.AlignTop)
|
||||
|
||||
self.game_settings_layout.setAlignment(Qt.AlignTop)
|
||||
self.ui.game_settings_layout.setAlignment(Qt.AlignTop)
|
||||
|
||||
self.linux_settings.mangohud.set_wrapper_activated.connect(
|
||||
lambda active: self.wrapper_settings.add_wrapper("mangohud")
|
||||
if active else self.wrapper_settings.delete_wrapper("mangohud"))
|
||||
|
||||
else:
|
||||
self.linux_settings_widget.setVisible(False)
|
||||
self.ui.linux_settings_widget.setVisible(False)
|
||||
|
||||
self.env_vars = EnvVars(self)
|
||||
self.game_settings_layout.addWidget(self.env_vars)
|
||||
self.ui.game_settings_layout.addWidget(self.env_vars)
|
||||
|
||||
if is_default:
|
||||
for i in range(4): # remove some entries which are not supported by default
|
||||
self.launch_settings_layout.removeRow(0)
|
||||
self.ui.launch_settings_layout.removeRow(self.ui.skip_update)
|
||||
self.ui.launch_settings_layout.removeRow(self.ui.offline)
|
||||
self.ui.launch_settings_layout.removeRow(self.ui.launch_params)
|
||||
|
||||
self.load_settings("default")
|
||||
|
||||
def save_line_edit(self, option, value):
|
||||
if value:
|
||||
config_helper.add_option(self.game.app_name, option, value)
|
||||
else:
|
||||
config_helper.remove_option(self.game.app_name, option)
|
||||
config_helper.save_config()
|
||||
|
||||
def update_combobox(self, i, option):
|
||||
if self.change:
|
||||
# remove section
|
||||
if i:
|
||||
if i == 1:
|
||||
config_helper.add_option(self.game.app_name, option, "true")
|
||||
if i == 2:
|
||||
config_helper.add_option(self.game.app_name, option, "false")
|
||||
else:
|
||||
config_helper.remove_option(self.game.app_name, option)
|
||||
config_helper.save_config()
|
||||
|
||||
def load_settings(self, app_name):
|
||||
self.app_name = app_name
|
||||
self.wrapper_settings.load_settings(app_name)
|
||||
|
@ -101,9 +77,9 @@ class DefaultGameSettings(QWidget, Ui_GameSettings):
|
|||
proton = proton.text
|
||||
self.proton_settings.load_settings(app_name, proton)
|
||||
if proton:
|
||||
self.linux_settings.wine_groupbox.setEnabled(False)
|
||||
self.linux_settings.ui.wine_groupbox.setEnabled(False)
|
||||
else:
|
||||
self.linux_settings.wine_groupbox.setEnabled(True)
|
||||
self.linux_settings.ui.wine_groupbox.setEnabled(True)
|
||||
self.env_vars.update_game(app_name)
|
||||
|
||||
|
||||
|
|
|
@ -13,10 +13,11 @@ from rare.widgets.indicator_edit import PathEdit, IndicatorReasonsCommon
|
|||
logger = getLogger("LinuxSettings")
|
||||
|
||||
|
||||
class LinuxSettings(QWidget, Ui_LinuxSettings):
|
||||
def __init__(self, name=None):
|
||||
super(LinuxSettings, self).__init__()
|
||||
self.setupUi(self)
|
||||
class LinuxSettings(QWidget):
|
||||
def __init__(self, name=None, parent=None):
|
||||
super(LinuxSettings, self).__init__(parent=parent)
|
||||
self.ui = Ui_LinuxSettings()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
self.core = LegendaryCoreSingleton()
|
||||
self.signals = GlobalSignalsSingleton()
|
||||
|
@ -30,7 +31,7 @@ class LinuxSettings(QWidget, Ui_LinuxSettings):
|
|||
edit_func=lambda path: (os.path.isdir(path) or not path, path, IndicatorReasonsCommon.DIR_NOT_EXISTS),
|
||||
save_func=self.save_prefix,
|
||||
)
|
||||
self.prefix_layout.addWidget(self.wine_prefix)
|
||||
self.ui.prefix_layout.addWidget(self.wine_prefix)
|
||||
|
||||
# Wine executable
|
||||
self.wine_exec = PathEdit(
|
||||
|
@ -42,15 +43,15 @@ class LinuxSettings(QWidget, Ui_LinuxSettings):
|
|||
text, section=self.name, setting="wine_executable"
|
||||
),
|
||||
)
|
||||
self.exec_layout.addWidget(self.wine_exec)
|
||||
self.ui.exec_layout.addWidget(self.wine_exec)
|
||||
|
||||
# dxvk
|
||||
self.dxvk = DxvkSettings()
|
||||
self.overlay_layout.addWidget(self.dxvk)
|
||||
self.ui.linux_layout.addWidget(self.dxvk)
|
||||
self.dxvk.load_settings(self.name)
|
||||
|
||||
self.mangohud = MangoHudSettings()
|
||||
self.overlay_layout.addWidget(self.mangohud)
|
||||
self.ui.linux_layout.addWidget(self.mangohud)
|
||||
self.mangohud.load_settings(self.name)
|
||||
|
||||
if not shutil.which("mangohud"):
|
||||
|
@ -69,7 +70,7 @@ class LinuxSettings(QWidget, Ui_LinuxSettings):
|
|||
self.save_setting(text, self.name, "wine_prefix")
|
||||
self.signals.application.prefix_updated.emit()
|
||||
|
||||
def load_setting(self, section: str, setting: str, fallback: str = str()):
|
||||
def load_setting(self, section: str, setting: str, fallback: str = ""):
|
||||
return self.core.lgd.config.get(section, setting, fallback=fallback)
|
||||
|
||||
def save_setting(self, text: str, section: str, setting: str):
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'rare/ui/components/tabs/games/game_info/game_settings.ui'
|
||||
# Form implementation generated from reading ui file 'rare/ui/components/tabs/settings/game_settings.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
# Created by: PyQt5 UI code generator 5.15.9
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
@ -14,11 +14,11 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_GameSettings(object):
|
||||
def setupUi(self, GameSettings):
|
||||
GameSettings.setObjectName("GameSettings")
|
||||
GameSettings.resize(263, 261)
|
||||
GameSettings.resize(505, 261)
|
||||
self.game_settings_layout = QtWidgets.QVBoxLayout(GameSettings)
|
||||
self.game_settings_layout.setObjectName("game_settings_layout")
|
||||
self.launch_settings_group = QtWidgets.QGroupBox(GameSettings)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.launch_settings_group.sizePolicy().hasHeightForWidth())
|
||||
|
@ -61,12 +61,6 @@ class Ui_GameSettings(object):
|
|||
self.launch_params = QtWidgets.QLineEdit(self.launch_settings_group)
|
||||
self.launch_params.setObjectName("launch_params")
|
||||
self.launch_settings_layout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.launch_params)
|
||||
self.override_exe_label = QtWidgets.QLabel(self.launch_settings_group)
|
||||
self.override_exe_label.setObjectName("override_exe_label")
|
||||
self.launch_settings_layout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.override_exe_label)
|
||||
self.override_exe_edit = QtWidgets.QLineEdit(self.launch_settings_group)
|
||||
self.override_exe_edit.setObjectName("override_exe_edit")
|
||||
self.launch_settings_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.override_exe_edit)
|
||||
self.game_settings_layout.addWidget(self.launch_settings_group)
|
||||
self.proton_layout = QtWidgets.QVBoxLayout()
|
||||
self.proton_layout.setObjectName("proton_layout")
|
||||
|
@ -94,8 +88,6 @@ class Ui_GameSettings(object):
|
|||
self.offline.setItemText(2, _translate("GameSettings", "No"))
|
||||
self.launch_params_label.setText(_translate("GameSettings", "Launch parameters"))
|
||||
self.launch_params.setPlaceholderText(_translate("GameSettings", "parameters"))
|
||||
self.override_exe_label.setText(_translate("GameSettings", "Override Exe"))
|
||||
self.override_exe_edit.setPlaceholderText(_translate("GameSettings", "Relative path to launch executable"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>263</width>
|
||||
<height>261</height>
|
||||
<width>483</width>
|
||||
<height>154</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -17,7 +17,7 @@
|
|||
<item>
|
||||
<widget class="QGroupBox" name="launch_settings_group">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -107,41 +107,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="override_exe_label">
|
||||
<property name="text">
|
||||
<string>Override Exe</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="override_exe_edit">
|
||||
<property name="placeholderText">
|
||||
<string>Relative path to launch executable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="proton_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="linux_settings_widget" native="true">
|
||||
<layout class="QVBoxLayout" name="linux_settings_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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Form implementation generated from reading ui file 'rare/ui/components/tabs/settings/linux.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.6
|
||||
# Created by: PyQt5 UI code generator 5.15.9
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
@ -14,10 +14,15 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_LinuxSettings(object):
|
||||
def setupUi(self, LinuxSettings):
|
||||
LinuxSettings.setObjectName("LinuxSettings")
|
||||
LinuxSettings.resize(109, 138)
|
||||
LinuxSettings.resize(394, 84)
|
||||
self.linux_layout = QtWidgets.QVBoxLayout(LinuxSettings)
|
||||
self.linux_layout.setObjectName("linux_layout")
|
||||
self.wine_groupbox = QtWidgets.QGroupBox(LinuxSettings)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.wine_groupbox.sizePolicy().hasHeightForWidth())
|
||||
self.wine_groupbox.setSizePolicy(sizePolicy)
|
||||
self.wine_groupbox.setObjectName("wine_groupbox")
|
||||
self.wine_layout = QtWidgets.QFormLayout(self.wine_groupbox)
|
||||
self.wine_layout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
|
@ -37,11 +42,6 @@ class Ui_LinuxSettings(object):
|
|||
self.exec_layout.setObjectName("exec_layout")
|
||||
self.wine_layout.setLayout(1, QtWidgets.QFormLayout.FieldRole, self.exec_layout)
|
||||
self.linux_layout.addWidget(self.wine_groupbox)
|
||||
self.overlay_layout = QtWidgets.QVBoxLayout()
|
||||
self.overlay_layout.setObjectName("overlay_layout")
|
||||
self.linux_layout.addLayout(self.overlay_layout)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.linux_layout.addItem(spacerItem)
|
||||
|
||||
self.retranslateUi(LinuxSettings)
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>109</width>
|
||||
<height>138</height>
|
||||
<width>394</width>
|
||||
<height>84</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -16,6 +16,12 @@
|
|||
<layout class="QVBoxLayout" name="linux_layout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="wine_groupbox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Wine Settings</string>
|
||||
</property>
|
||||
|
@ -52,22 +58,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="overlay_layout"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="linux_vspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
|
Loading…
Reference in a new issue