1
0
Fork 0
mirror of synced 2024-06-17 18:14:44 +12:00

Fixed size bug

This commit is contained in:
Dummerle 2021-04-09 12:08:28 +02:00
parent 294a7201be
commit 349bdad1a1
3 changed files with 14 additions and 7 deletions

View file

@ -3,7 +3,7 @@ import os
from PyQt5.QtCore import Qt, pyqtSignal
from PyQt5.QtGui import QPixmap, QKeyEvent
from PyQt5.QtWidgets import QWidget, QPushButton, QVBoxLayout, QLabel, QHBoxLayout, QTabWidget, QMessageBox, \
QProgressBar, QStackedWidget, QGroupBox
QProgressBar, QStackedWidget, QGroupBox, QScrollArea
from qtawesome import icon
from rare.components.dialogs.uninstall_dialog import UninstallDialog
@ -42,7 +42,7 @@ class InfoTabs(QTabWidget):
self.parent().layout.setCurrentIndex(0)
class GameInfo(QWidget):
class GameInfo(QScrollArea):
igame: InstalledGame
game: Game
update_list = pyqtSignal()
@ -51,8 +51,10 @@ class GameInfo(QWidget):
def __init__(self, core: LegendaryCore):
super(GameInfo, self).__init__()
self.widget = QWidget()
self.core = core
self.layout = QVBoxLayout()
self.setWidgetResizable(True)
# TODO More Information: Image text settings needs_verification platform
top_layout = QHBoxLayout()
@ -86,7 +88,6 @@ class GameInfo(QWidget):
top_layout.addLayout(right_layout)
top_layout.addStretch()
self.game_actions = GameActions()
self.game_actions.uninstall_button.clicked.connect(self.uninstall)
@ -96,7 +97,8 @@ class GameInfo(QWidget):
self.layout.addLayout(top_layout)
self.layout.addWidget(self.game_actions)
self.layout.addStretch()
self.setLayout(self.layout)
self.widget.setLayout(self.layout)
self.setWidget(self.widget)
def uninstall(self):
infos = UninstallDialog(self.game).get_information()

View file

@ -1,6 +1,7 @@
import os
from PyQt5.QtWidgets import QWidget, QLabel, QVBoxLayout, QComboBox, QFileDialog, QPushButton, QMessageBox, QLineEdit
from PyQt5.QtWidgets import QWidget, QLabel, QVBoxLayout, QComboBox, QFileDialog, QPushButton, QMessageBox, QLineEdit, \
QScrollArea
from rare.components.tabs.settings.linux import LinuxSettings
from rare.components.tabs.settings.settings_widget import SettingsWidget
@ -9,7 +10,7 @@ from custom_legendary.core import LegendaryCore
from custom_legendary.models.game import InstalledGame, Game
class GameSettings(QWidget):
class GameSettings(QScrollArea):
game: Game
igame: InstalledGame
# variable to no update when changing game
@ -18,6 +19,8 @@ class GameSettings(QWidget):
def __init__(self, core: LegendaryCore):
super(GameSettings, self).__init__()
self.core = core
self.widget = QWidget()
self.setWidgetResizable(True)
self.layout = QVBoxLayout()
self.title = QLabel("Error")
self.layout.addWidget(self.title)
@ -71,7 +74,8 @@ class GameSettings(QWidget):
# startparams, skip_update_check
self.layout.addStretch(1)
self.setLayout(self.layout)
self.widget.setLayout(self.layout)
self.setWidget(self.widget)
def update_wrapper(self):
wrapper = self.wrapper.text()

View file

@ -44,6 +44,7 @@ class ImportWidget(QWidget):
self.gb_layout.addWidget(self.import_game_info)
self.override_app_name_label = QLabel(self.tr("Override app name (Only if imported game from legendary or the app could not find the app name)"))
self.override_app_name_label.setWordWrap(True)
self.app_name_input = QLineEdit()
self.app_name_input.setFixedHeight(32)
minilayout = QHBoxLayout()