feat: add styling to Context Menu
All checks were successful
Code and build check / Check code (push) Successful in 1m39s
Code and build check / Build with uv (push) Successful in 52s

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-06-08 23:36:01 +05:00
parent b0ec4487ca
commit 6fa145ee13
2 changed files with 35 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class ContextMenuManager:
"""
menu = QMenu(self.parent)
menu.setStyleSheet(self.theme.CONTEXT_MENU_STYLE)
favorites = read_favorites()
is_favorite = game_card.name in favorites

View File

@ -8,6 +8,40 @@ current_theme_name = read_theme_from_config()
favoriteLabelSize = 48, 48
pixmapsScaledSize = 60, 60
CONTEXT_MENU_STYLE = """
QMenu {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop:0 rgba(40, 40, 40, 0.95),
stop:1 rgba(25, 25, 25, 0.95));
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 12px;
color: #ffffff;
font-family: 'Play';
font-size: 16px;
padding: 5px;
}
QMenu::item {
padding: 8px 20px;
background: transparent;
border-radius: 8px;
color: #ffffff;
}
QMenu::item:selected {
background: #282a33;
color: #09bec8;
}
QMenu::item:hover {
background: #282a33;
color: #09bec8;
}
QMenu::item:focus {
background: #409EFF;
color: #ffffff;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 8px;
}
"""
# СТИЛЬ ШАПКИ ГЛАВНОГО ОКНА
MAIN_WINDOW_HEADER_STYLE = """
QFrame {