This commit is contained in:
Auric Vente 2024-07-19 08:06:12 -06:00
parent 9e2c382e07
commit 8219137999
7 changed files with 23 additions and 8 deletions

View File

@ -8,7 +8,7 @@ import appdirs # type: ignore
class Config:
title: str = "Cromulant"
width: int = 900
height: int = 800
height: int = 900
max_ants: int = 100
here: Path
ants_json: Path
@ -37,6 +37,7 @@ class Config:
triumph_message: str = "Scored a triumph"
hit_message: str = "Took a hit"
song_path: Path
logo_path: Path
@staticmethod
def prepare() -> None:
@ -55,3 +56,4 @@ class Config:
Config.font_path = Config.here / "fonts" / "NotoSans-Regular.ttf"
Config.emoji_font_path = Config.here / "fonts" / "NotoEmoji-Regular.ttf"
Config.song_path = Config.here / "audio" / "March of the Cyber Ants.mp3"
Config.logo_path = Config.here / "img" / "logo_3.jpg"

BIN
cromulant/img/logo_1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
cromulant/img/logo_2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

BIN
cromulant/img/logo_3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
cromulant/img/logo_4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

View File

@ -82,12 +82,12 @@ class Window:
Window.emoji_font = QFontDatabase.applicationFontFamilies(emoji_font_id)[0]
style = f"""
QWidget {{
background-color: {Config.background_color};
color: {Config.text_color};
font-size: {Config.font_size}px;
}}
""".strip()
QWidget {{
background-color: {Config.background_color};
color: {Config.text_color};
font-size: {Config.font_size}px;
}}
""".strip()
Window.app.setFont(Window.font)
Window.root.setContentsMargins(0, 0, 0, 0)
@ -139,6 +139,19 @@ class Window:
Window.scroll_area = QScrollArea()
Window.scroll_area.setWidgetResizable(True)
# image_path = str(Config.logo_path)
# image_url = QUrl.fromLocalFile(image_path).toString()
# style = f"""
# QWidget {{
# background-image: url({image_url});
# background-repeat: no-repeat;
# background-position: center;
# }}
# """
# Window.scroll_area.setStyleSheet(style)
container = QWidget()
parent = QVBoxLayout(container)
Window.view = QVBoxLayout()