1
0
Fork 0
mirror of synced 2024-06-17 18:14:44 +12:00
This commit is contained in:
Dummerle 2020-12-17 11:54:59 +01:00
parent ef32986e04
commit f4ccaf4c29
13 changed files with 18 additions and 14 deletions

View file

@ -7,6 +7,8 @@ from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QWidget, QLabel, QHBoxLayout, QVBoxLayout, QPushButton, QStyle
from legendary.core import LegendaryCore
from Rare.config import IMAGE_DIR
from Rare.Dialogs import InstallDialog, GameSettingsDialog
from Rare.utils import legendaryUtils
@ -50,18 +52,21 @@ class GameWidget(QWidget):
# self.dev =
self.game_running = False
self.layout = QHBoxLayout()
if os.path.exists(f"../images/{game.app_name}/FinalArt.png"):
pixmap = QPixmap(f"../images/{game.app_name}/FinalArt.png")
elif os.path.exists(f"../images/{game.app_name}/DieselGameBoxTall.png"):
pixmap = QPixmap(f"../images/{game.app_name}/DieselGameBoxTall.png")
elif os.path.exists(f"../images/{game.app_name}/DieselGameBoxLogo.png"):
pixmap = QPixmap(f"../images/{game.app_name}/DieselGameBoxLogo.png")
if os.path.exists(f"{IMAGE_DIR}/{game.app_name}/FinalArt.png"):
pixmap = QPixmap(f"{IMAGE_DIR}/{game.app_name}/FinalArt.png")
elif os.path.exists(f"{IMAGE_DIR}/{game.app_name}/DieselGameBoxTall.png"):
pixmap = QPixmap(f"{IMAGE_DIR}/{game.app_name}/DieselGameBoxTall.png")
elif os.path.exists(f"{IMAGE_DIR}/{game.app_name}/DieselGameBoxLogo.png"):
pixmap = QPixmap(f"{IMAGE_DIR}/{game.app_name}/DieselGameBoxLogo.png")
else:
logger.warning("No Image found")
pixmap = pixmap.scaled(180, 240)
self.image = QLabel()
self.image.setPixmap(pixmap)
self.layout.addWidget(self.image)
logger.warning(f"No Image found: {self.game.title}")
pixmap=None
if pixmap:
pixmap = pixmap.scaled(180, 240)
self.image = QLabel()
self.image.setPixmap(pixmap)
self.layout.addWidget(self.image)
##Layout on the right
self.childLayout = QVBoxLayout()

View file

@ -7,7 +7,7 @@ rare_config = configparser.ConfigParser()
if not os.path.exists(config_path):
os.mkdir(config_path)
rare_config["Rare"] = {
"image_dir": "../",
"image_dir": ".",
"theme": "light"
}
rare_config.write(open(config_path + "config.ini", "w"))

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -27,8 +27,7 @@ setuptools.setup(
"legendary-gl",
"requests<3.0",
"pillow",
"PyQT5",
"PyQTWebEngine",
"PyQtWebEngine",
"setuptools",
"wheel"
]