This commit is contained in:
Auric Vente 2024-07-19 19:58:27 -06:00
parent c185aaa500
commit f04927a453
3 changed files with 16 additions and 0 deletions

View File

@ -38,6 +38,10 @@ class Config:
hit_message: str = "Took a hit" hit_message: str = "Took a hit"
song_path: Path song_path: Path
logo_path: Path logo_path: Path
context_menu_background_color: str = "rgb(22, 22, 22)"
context_menu_text_color: str = "white"
context_menu_hover_background_color: str = "rgb(36, 36, 36)"
context_menu_hover_text_color: str = "white"
@staticmethod @staticmethod
def prepare() -> None: def prepare() -> None:

View File

@ -89,11 +89,13 @@ class Game:
container.setAlignment(Qt.AlignTop) container.setAlignment(Qt.AlignTop)
title_label = QLabel(title) title_label = QLabel(title)
title_label.setTextInteractionFlags(Qt.TextSelectableByMouse)
title_label.setStyleSheet("font-weight: bold;") title_label.setStyleSheet("font-weight: bold;")
title_label.setWordWrap(True) title_label.setWordWrap(True)
Window.expand(title_label) Window.expand(title_label)
message_label = QLabel(message) message_label = QLabel(message)
message_label.setTextInteractionFlags(Qt.TextSelectableByMouse)
message_label.setWordWrap(True) message_label.setWordWrap(True)
Window.expand(message_label) Window.expand(message_label)

View File

@ -87,6 +87,16 @@ class Window:
color: {Config.text_color}; color: {Config.text_color};
font-size: {Config.font_size}px; font-size: {Config.font_size}px;
}} }}
QMenu {{
background-color: {Config.context_menu_background_color};
color: {Config.context_menu_text_color};
}}
QMenu::item:selected {{
background-color: {Config.context_menu_hover_background_color};
color: {Config.context_menu_hover_text_color};
}}
""".strip() """.strip()
Window.app.setStyleSheet(style) Window.app.setStyleSheet(style)