chore(theme): rewrite it to const
Code check / Check code (pull_request) Successful in 1m31s
Code check / Check code (pull_request) Successful in 1m31s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
19 files changed
+1808
-1609
No files matched your search
@@ -111,6 +111,14 @@ QColor(128, 128, 128)
|
||||
# NEVER: Magic numbers or hardcoded constant values
|
||||
if status == 3: ...
|
||||
if key_value >= 0x01000000: ...
|
||||
|
||||
# NEVER: Visual constants in application code (game_card.py, detail_pages/, etc.)
|
||||
# ALL visual/layout constants MUST live in themes/standart/styles/constants.py
|
||||
# Application code reads them via self.theme.CONSTANT_NAME
|
||||
COMPACT_CARD_WIDTH_THRESHOLD = 150 # BAD: in game_card.py
|
||||
RIBBON_SIZE_RATIO = 0.28 # BAD: in game_card.py
|
||||
BADGE_ICON_SIZE = 16 # BAD: in detail_pages/widgets.py
|
||||
SOURCE_CORNER_RATIO = 0.28 # BAD: in detail_pages/widgets.py
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -150,6 +158,11 @@ QColor(self.theme.color_disabled_text)
|
||||
# New QSS styles → portprotonqt/themes/standart/styles/base.py or submodule
|
||||
# Never add style constants to application code
|
||||
|
||||
# ALWAYS: Use descriptive named constants, enums, or built-in Qt values instead of magic numbers
|
||||
STATUS_COMPLETED = 3
|
||||
if status == STATUS_COMPLETED: ...
|
||||
# Never add style constants to application code
|
||||
|
||||
# ALWAYS: Use descriptive named constants, enums, or built-in Qt values instead of magic numbers
|
||||
STATUS_COMPLETED = 3
|
||||
if status == STATUS_COMPLETED: ...
|
||||
@@ -785,6 +798,15 @@ Fix: Use theme constant
|
||||
|
||||
shadow.setColor(QColor(0, 0, 0, 150)) # Bad
|
||||
shadow.setColor(QColor(self.theme.color_shadow_card)) # Good
|
||||
|
||||
[MEDIUM] Hardcoded style constant in application code
|
||||
File: portprotonqt/game_card.py:52
|
||||
Issue: Visual constant defined in application code instead of theme
|
||||
Fix: Add to themes/standart/styles/constants.py and read via self.theme
|
||||
|
||||
COMPACT_CARD_WIDTH_THRESHOLD = 150 # Bad: in game_card.py
|
||||
# In constants.py: COMPACT_CARD = {"width_threshold": 150, ...}
|
||||
# In game_card.py: self.theme.COMPACT_CARD["width_threshold"] # Good
|
||||
```
|
||||
|
||||
### Approval
|
||||
|
||||
@@ -213,7 +213,7 @@ class GameCardAnimations:
|
||||
elif (self.game_card._hovered or self.game_card._focused) and animation_type in {"fill", "scale_fill"}:
|
||||
fill_color_value = self.theme.GAME_CARD_ANIMATION.get(
|
||||
"fill_color",
|
||||
getattr(self.theme, "color_a", self.theme.color_f),
|
||||
getattr(self.theme, "color_accent", self.theme.color_text),
|
||||
)
|
||||
fill_alpha = int(self.theme.GAME_CARD_ANIMATION.get("fill_alpha", 90))
|
||||
fill_color = QColor(fill_color_value)
|
||||
@@ -223,7 +223,7 @@ class GameCardAnimations:
|
||||
elif (self.game_card._hovered or self.game_card._focused) and animation_type == "stripe":
|
||||
stripe_color_value = self.theme.GAME_CARD_ANIMATION.get(
|
||||
"stripe_color",
|
||||
getattr(self.theme, "color_a", self.theme.color_f),
|
||||
getattr(self.theme, "color_accent", self.theme.color_text),
|
||||
)
|
||||
stripe_alpha = int(self.theme.GAME_CARD_ANIMATION.get("stripe_alpha", 255))
|
||||
stripe_color = QColor(stripe_color_value)
|
||||
@@ -232,7 +232,7 @@ class GameCardAnimations:
|
||||
elif (self.game_card._hovered or self.game_card._focused) and animation_type == "glow":
|
||||
glow_color_value = self.theme.GAME_CARD_ANIMATION.get(
|
||||
"stripe_color",
|
||||
getattr(self.theme, "color_a", self.theme.color_f),
|
||||
getattr(self.theme, "color_accent", self.theme.color_text),
|
||||
)
|
||||
glow_base_alpha = int(self.theme.GAME_CARD_ANIMATION.get("glow_base_alpha", 120))
|
||||
glow_pulse_alpha = int(self.theme.GAME_CARD_ANIMATION.get("glow_pulse_alpha", 80))
|
||||
|
||||
@@ -29,10 +29,6 @@ from portprotonqt.detail_pages.widgets import (
|
||||
create_compact_layout_panel,
|
||||
create_compact_description_panel,
|
||||
create_detail_separator,
|
||||
COVER_WIDTH,
|
||||
COVER_HEIGHT,
|
||||
DETAIL_COMPACT_COVER_SIZE,
|
||||
DETAIL_COMPACT_WIDTH,
|
||||
)
|
||||
from portprotonqt.detail_pages.utils import (
|
||||
setup_image_loading,
|
||||
@@ -168,7 +164,8 @@ class DetailPageManager:
|
||||
def _is_compact_detail_layout(self) -> bool:
|
||||
if self._is_forced_compact_detail_layout():
|
||||
return True
|
||||
return self._detail_view_width() <= DETAIL_COMPACT_WIDTH
|
||||
compact_cfg = getattr(self.main_window.theme, "DETAIL_COMPACT", {})
|
||||
return self._detail_view_width() <= compact_cfg.get("width", 1280)
|
||||
|
||||
def _is_forced_compact_detail_layout(self) -> bool:
|
||||
layout_mode = str(
|
||||
@@ -191,22 +188,24 @@ class DetailPageManager:
|
||||
return image_label
|
||||
|
||||
def _get_cover_label_size(self, compact_layout: bool) -> tuple[int, int]:
|
||||
cover_cfg = getattr(self.main_window.theme, "COVER", {})
|
||||
if not compact_layout:
|
||||
return COVER_WIDTH, COVER_HEIGHT
|
||||
return cover_cfg.get("width", 300), cover_cfg.get("height", 450)
|
||||
size = getattr(
|
||||
self.main_window.theme,
|
||||
"detailCompactCoverImageSize",
|
||||
DETAIL_COMPACT_COVER_SIZE,
|
||||
getattr(self.main_window.theme, "DETAIL_COMPACT", {}).get("cover_size", 128),
|
||||
)
|
||||
return size, size
|
||||
|
||||
def _get_cover_frame_size(self, compact_layout: bool) -> tuple[int, int]:
|
||||
cover_cfg = getattr(self.main_window.theme, "COVER", {})
|
||||
if not compact_layout:
|
||||
return COVER_WIDTH, COVER_HEIGHT
|
||||
return cover_cfg.get("width", 300), cover_cfg.get("height", 450)
|
||||
size = getattr(
|
||||
self.main_window.theme,
|
||||
"detailCompactCoverFrameSize",
|
||||
DETAIL_COMPACT_COVER_SIZE,
|
||||
getattr(self.main_window.theme, "DETAIL_COMPACT", {}).get("cover_size", 128),
|
||||
)
|
||||
return size, size
|
||||
|
||||
|
||||
@@ -25,23 +25,12 @@ from portprotonqt.config import ui_config
|
||||
from portprotonqt.theme_manager import ThemeManager
|
||||
|
||||
|
||||
COVER_WIDTH = 300
|
||||
COVER_HEIGHT = 450
|
||||
DETAIL_COMPACT_COVER_SIZE = 128
|
||||
DETAIL_COMPACT_WIDTH = 1280
|
||||
BADGE_WIDTH = int(COVER_WIDTH * 2 / 3)
|
||||
BADGE_ICON_SIZE = 16
|
||||
BADGE_COMPACT_WIDTH = BADGE_ICON_SIZE + 14
|
||||
BADGE_RIGHT_MARGIN = 8
|
||||
BADGE_SPACING = 5
|
||||
BADGE_TOP_Y = 10
|
||||
|
||||
|
||||
def _apply_badge_view_mode(badge: ClickableLabel) -> None:
|
||||
def _apply_badge_view_mode(badge: ClickableLabel, theme) -> None:
|
||||
"""Apply configured badge view mode."""
|
||||
mode = ui_config.get_badge_view_mode()
|
||||
compact_mode = mode == "compact"
|
||||
badge.setCompactMode(compact_mode, BADGE_COMPACT_WIDTH, BADGE_WIDTH)
|
||||
badge_cfg = getattr(theme, "BADGE", {})
|
||||
badge.setCompactMode(compact_mode, badge_cfg.get("compact_width", 30), badge_cfg.get("width", 200))
|
||||
badge.setVisible(mode != "hidden")
|
||||
|
||||
|
||||
@@ -109,14 +98,17 @@ def create_cover_frame(
|
||||
favorite_icon_name: str | None = None,
|
||||
on_favorite_click: Callable[[], str | None] | None = None,
|
||||
badges: list | None = None,
|
||||
cover_width: int = COVER_WIDTH,
|
||||
cover_height: int = COVER_HEIGHT,
|
||||
cover_width: int | None = None,
|
||||
cover_height: int | None = None,
|
||||
game_source: str = "",
|
||||
theme_manager: ThemeManager | None = None,
|
||||
) -> QFrame:
|
||||
"""Create cover frame with image, favorite icon, and badges."""
|
||||
cover_cfg = getattr(theme, "COVER", {})
|
||||
cover_w = cover_width if cover_width is not None else cover_cfg.get("width", 300)
|
||||
cover_h = cover_height if cover_height is not None else cover_cfg.get("height", 450)
|
||||
cover_frame = QFrame()
|
||||
cover_frame.setFixedSize(cover_width, cover_height)
|
||||
cover_frame.setFixedSize(cover_w, cover_h)
|
||||
cover_frame.setStyleSheet(theme.COVER_FRAME_STYLE)
|
||||
|
||||
_setup_cover_shadow(cover_frame, theme)
|
||||
@@ -129,17 +121,13 @@ def create_cover_frame(
|
||||
_add_favorite_label(cover_frame, favorite_icon_name, theme, on_favorite_click)
|
||||
|
||||
if badges:
|
||||
_position_badges(cover_frame, badges, cover_width)
|
||||
_position_badges(cover_frame, badges, cover_w, theme)
|
||||
|
||||
_add_source_corner(cover_frame, game_source, theme, theme_manager, cover_width, cover_height)
|
||||
_add_source_corner(cover_frame, game_source, theme, theme_manager, cover_w, cover_h)
|
||||
|
||||
return cover_frame
|
||||
|
||||
|
||||
SOURCE_CORNER_RATIO = 0.28
|
||||
SOURCE_CORNER_MIN_SIZE = 54
|
||||
|
||||
|
||||
def _add_source_corner(
|
||||
cover_frame: QFrame,
|
||||
game_source: str,
|
||||
@@ -158,15 +146,14 @@ def _add_source_corner(
|
||||
if not icon:
|
||||
return
|
||||
|
||||
corner_colors = theme.get_source_corner_colors()
|
||||
corner_config = theme.get_source_corner_config()
|
||||
ribbon = SourceCorner(
|
||||
icon=icon,
|
||||
color=corner_colors["color"],
|
||||
fold_color=corner_colors["fold_color"],
|
||||
config=corner_config,
|
||||
parent=cover_frame,
|
||||
)
|
||||
ribbon_size = int(cover_width * SOURCE_CORNER_RATIO)
|
||||
ribbon_size = max(ribbon_size, int(SOURCE_CORNER_MIN_SIZE))
|
||||
ribbon_size = int(cover_width * corner_config.get("size_ratio", 0.28))
|
||||
ribbon_size = max(ribbon_size, int(corner_config.get("min_size", 54)))
|
||||
ribbon.setFixedSize(ribbon_size, ribbon_size)
|
||||
ribbon.move(cover_width - ribbon_size, cover_height - ribbon_size)
|
||||
ribbon.setVisible(True)
|
||||
@@ -283,25 +270,25 @@ def _add_favorite_label(
|
||||
favorite_label.raise_()
|
||||
|
||||
|
||||
def _position_badges(cover_frame: QFrame, badges: list, cover_width: int = COVER_WIDTH) -> None:
|
||||
def _position_badges(cover_frame: QFrame, badges: list, cover_width: int, theme) -> None:
|
||||
"""Position badges on cover frame."""
|
||||
badge_cfg = getattr(theme, "BADGE", {})
|
||||
badge_y_positions = []
|
||||
|
||||
for badge_data in badges:
|
||||
badge = badge_data["label"]
|
||||
# Reparent badge to cover_frame
|
||||
badge.setParent(cover_frame)
|
||||
badge.setCompactRelayoutCallback(
|
||||
lambda: _position_badges(cover_frame, badges, cover_width)
|
||||
lambda: _position_badges(cover_frame, badges, cover_width, theme)
|
||||
)
|
||||
if badge.isHidden():
|
||||
continue
|
||||
badge_x = cover_width - badge.width() - BADGE_RIGHT_MARGIN
|
||||
badge_x = cover_width - badge.width() - badge_cfg.get("right_margin", 8)
|
||||
|
||||
if badge_y_positions:
|
||||
badge_y = badge_y_positions[-1] + BADGE_SPACING
|
||||
badge_y = badge_y_positions[-1] + badge_cfg.get("spacing", 5)
|
||||
else:
|
||||
badge_y = BADGE_TOP_Y
|
||||
badge_y = badge_cfg.get("top_y", 10)
|
||||
|
||||
badge.move(badge_x, badge_y)
|
||||
badge_y_positions.append(badge_y + badge.height())
|
||||
@@ -324,11 +311,11 @@ def create_protondb_badge(
|
||||
"ProtonDB",
|
||||
icon=icon,
|
||||
parent=parent,
|
||||
icon_size=BADGE_ICON_SIZE,
|
||||
icon_size=getattr(main_window.theme, "BADGE", {}).get("icon_size", 16),
|
||||
icon_space=3,
|
||||
)
|
||||
badge.setStyleSheet(main_window.theme.get_protondb_badge_style(protondb_tier))
|
||||
_apply_badge_view_mode(badge)
|
||||
_apply_badge_view_mode(badge, main_window.theme)
|
||||
badge.clicked.connect(
|
||||
lambda: QDesktopServices.openUrl(QUrl(f"https://www.protondb.com/app/{appid}"))
|
||||
)
|
||||
@@ -346,11 +333,11 @@ def create_steam_badge(
|
||||
"Steam",
|
||||
icon=steam_icon,
|
||||
parent=parent,
|
||||
icon_size=BADGE_ICON_SIZE,
|
||||
icon_size=getattr(main_window.theme, "BADGE", {}).get("icon_size", 16),
|
||||
icon_space=5,
|
||||
)
|
||||
badge.setStyleSheet(main_window.theme.STEAM_BADGE_STYLE)
|
||||
_apply_badge_view_mode(badge)
|
||||
_apply_badge_view_mode(badge, main_window.theme)
|
||||
badge.clicked.connect(
|
||||
lambda: QDesktopServices.openUrl(QUrl(f"https://steamcommunity.com/app/{appid}"))
|
||||
)
|
||||
@@ -369,14 +356,14 @@ def create_portproton_badge(
|
||||
"PPDB",
|
||||
icon=portproton_icon,
|
||||
parent=parent,
|
||||
icon_size=BADGE_ICON_SIZE,
|
||||
icon_size=getattr(main_window.theme, "BADGE", {}).get("icon_size", 16),
|
||||
icon_space=5,
|
||||
)
|
||||
if ppdb_rating:
|
||||
badge.setStyleSheet(main_window.theme.get_ppdb_badge_style(ppdb_rating))
|
||||
else:
|
||||
badge.setStyleSheet(main_window.theme.STEAM_BADGE_STYLE)
|
||||
_apply_badge_view_mode(badge)
|
||||
_apply_badge_view_mode(badge, main_window.theme)
|
||||
badge.clicked.connect(
|
||||
lambda: QDesktopServices.openUrl(QUrl(f"https://ppdb.linux-gaming.ru/game/{ppdb_id}"))
|
||||
)
|
||||
@@ -402,11 +389,11 @@ def create_anticheat_badge(
|
||||
anticheat_text,
|
||||
icon=icon,
|
||||
parent=parent,
|
||||
icon_size=BADGE_ICON_SIZE,
|
||||
icon_size=getattr(main_window.theme, "BADGE", {}).get("icon_size", 16),
|
||||
icon_space=3,
|
||||
)
|
||||
badge.setStyleSheet(main_window.theme.get_anticheat_badge_style(anticheat_status))
|
||||
_apply_badge_view_mode(badge)
|
||||
_apply_badge_view_mode(badge, main_window.theme)
|
||||
if anticheat_slug:
|
||||
anticheat_url = f"https://areweanticheatyet.com/game/{anticheat_slug}"
|
||||
else:
|
||||
|
||||
+53
-67
@@ -45,27 +45,6 @@ from portprotonqt.custom_widgets import ClickableLabel
|
||||
from portprotonqt.animations import GameCardAnimations
|
||||
|
||||
PROTONDB_TIERS = ("platinum", "gold", "silver", "bronze", "borked", "pending")
|
||||
COMPACT_CARD_WIDTH_THRESHOLD = 150
|
||||
COMPACT_CARD_HEIGHT_RATIO = 2.25
|
||||
COMPACT_CARD_TITLE_LINES = 3
|
||||
COMPACT_CARD_TITLE_SCALE = 0.75
|
||||
RIBBON_SIZE_RATIO = 0.28
|
||||
RIBBON_MIN_SIZE = 54
|
||||
RIBBON_MIN_WIDGET_SIZE = 4
|
||||
RIBBON_PEEL_START_RATIO = 0.32
|
||||
RIBBON_PEEL_MID_RATIO = 0.58
|
||||
RIBBON_PEEL_END_RATIO = 0.82
|
||||
RIBBON_PEEL_SHADOW_WIDTH = 3
|
||||
RIBBON_FOLD_START_RATIO = 0.60
|
||||
RIBBON_FOLD_END_RATIO = 0.92
|
||||
RIBBON_ICON_CENTER_RATIO = 0.84
|
||||
RIBBON_ICON_SIZE_RATIO = 0.25
|
||||
RIBBON_MIN_ICON_SIZE = 8
|
||||
RIBBON_GRADIENT_START = 0.0
|
||||
RIBBON_GRADIENT_END = 1.0
|
||||
RIBBON_GRADIENT_LIGHTER = 145
|
||||
RIBBON_GRADIENT_DARKER = 112
|
||||
RIBBON_FOLD_DARKER = 132
|
||||
|
||||
|
||||
def is_valid_protondb_tier(tier: str | None) -> bool:
|
||||
@@ -78,14 +57,15 @@ class SourceCorner(QWidget):
|
||||
def __init__(
|
||||
self,
|
||||
icon: str | QIcon | None = None,
|
||||
color: str = "",
|
||||
fold_color: str = "",
|
||||
config: dict | None = None,
|
||||
parent: QWidget | None = None,
|
||||
) -> None:
|
||||
super().__init__(parent)
|
||||
self._icon = icon
|
||||
self._color = QColor(color)
|
||||
self._fold_color = QColor(fold_color)
|
||||
cfg = config or {}
|
||||
self._color = QColor(cfg.get("ribbon_color", "#3f424d"))
|
||||
self._fold_color = QColor(cfg.get("ribbon_fold_color", "#00000096"))
|
||||
self._cfg = cfg
|
||||
self.setFixedSize(0, 0)
|
||||
self._visible = False
|
||||
|
||||
@@ -94,7 +74,8 @@ class SourceCorner(QWidget):
|
||||
return
|
||||
w = self.width()
|
||||
h = self.height()
|
||||
if w < RIBBON_MIN_WIDGET_SIZE or h < RIBBON_MIN_WIDGET_SIZE:
|
||||
cfg = self._cfg
|
||||
if w < cfg.get("min_widget_size", 4) or h < cfg.get("min_widget_size", 4):
|
||||
return
|
||||
|
||||
painter = QPainter(self)
|
||||
@@ -102,7 +83,7 @@ class SourceCorner(QWidget):
|
||||
painter.setRenderHint(QPainter.RenderHint.SmoothPixmapTransform)
|
||||
|
||||
shadow_path = self._create_shadow_path(w, h)
|
||||
painter.setPen(QPen(self._fold_color, RIBBON_PEEL_SHADOW_WIDTH))
|
||||
painter.setPen(QPen(self._fold_color, cfg.get("peel_shadow_width", 3)))
|
||||
painter.drawPath(shadow_path)
|
||||
|
||||
path = self._create_path(w, h)
|
||||
@@ -110,75 +91,79 @@ class SourceCorner(QWidget):
|
||||
painter.setPen(Qt.PenStyle.NoPen)
|
||||
painter.drawPath(path)
|
||||
fold_path = self._create_fold_path(w, h)
|
||||
painter.setBrush(self._color.darker(RIBBON_FOLD_DARKER))
|
||||
painter.setBrush(self._color.darker(cfg.get("fold_darker", 132)))
|
||||
painter.drawPath(fold_path)
|
||||
self._draw_icon(painter, w, h)
|
||||
|
||||
def _create_gradient(self, w: int, h: int) -> QLinearGradient:
|
||||
cfg = self._cfg
|
||||
gradient = QLinearGradient(
|
||||
w * RIBBON_PEEL_START_RATIO,
|
||||
w * cfg.get("peel_start_ratio", 0.32),
|
||||
h,
|
||||
w,
|
||||
h * RIBBON_PEEL_START_RATIO,
|
||||
h * cfg.get("peel_start_ratio", 0.32),
|
||||
)
|
||||
gradient.setColorAt(
|
||||
RIBBON_GRADIENT_START,
|
||||
self._color.lighter(RIBBON_GRADIENT_LIGHTER),
|
||||
cfg.get("gradient_start", 0.0),
|
||||
self._color.lighter(cfg.get("gradient_lighter", 145)),
|
||||
)
|
||||
gradient.setColorAt(
|
||||
RIBBON_GRADIENT_END,
|
||||
self._color.darker(RIBBON_GRADIENT_DARKER),
|
||||
cfg.get("gradient_end", 1.0),
|
||||
self._color.darker(cfg.get("gradient_darker", 112)),
|
||||
)
|
||||
return gradient
|
||||
|
||||
def _create_path(self, w: int, h: int) -> QPainterPath:
|
||||
cfg = self._cfg
|
||||
path = QPainterPath()
|
||||
path.moveTo(w, h)
|
||||
path.lineTo(w * RIBBON_PEEL_START_RATIO, h)
|
||||
path.lineTo(w * cfg.get("peel_start_ratio", 0.32), h)
|
||||
path.quadTo(
|
||||
w * RIBBON_PEEL_MID_RATIO,
|
||||
w * cfg.get("peel_mid_ratio", 0.58),
|
||||
h,
|
||||
w * RIBBON_PEEL_END_RATIO,
|
||||
h * RIBBON_PEEL_MID_RATIO,
|
||||
w * cfg.get("peel_end_ratio", 0.82),
|
||||
h * cfg.get("peel_mid_ratio", 0.58),
|
||||
)
|
||||
path.quadTo(
|
||||
w,
|
||||
h * RIBBON_PEEL_MID_RATIO,
|
||||
h * cfg.get("peel_mid_ratio", 0.58),
|
||||
w,
|
||||
h * RIBBON_PEEL_START_RATIO,
|
||||
h * cfg.get("peel_start_ratio", 0.32),
|
||||
)
|
||||
path.lineTo(w, h)
|
||||
path.closeSubpath()
|
||||
return path
|
||||
|
||||
def _create_fold_path(self, w: int, h: int) -> QPainterPath:
|
||||
cfg = self._cfg
|
||||
fold_path = QPainterPath()
|
||||
fold_path.moveTo(w, h)
|
||||
fold_path.lineTo(w * RIBBON_FOLD_START_RATIO, h)
|
||||
fold_path.lineTo(w * cfg.get("fold_start_ratio", 0.60), h)
|
||||
fold_path.quadTo(
|
||||
w * RIBBON_FOLD_END_RATIO,
|
||||
h * RIBBON_FOLD_END_RATIO,
|
||||
w * cfg.get("fold_end_ratio", 0.92),
|
||||
h * cfg.get("fold_end_ratio", 0.92),
|
||||
w,
|
||||
h * RIBBON_FOLD_START_RATIO,
|
||||
h * cfg.get("fold_start_ratio", 0.60),
|
||||
)
|
||||
fold_path.lineTo(w, h)
|
||||
fold_path.closeSubpath()
|
||||
return fold_path
|
||||
|
||||
def _create_shadow_path(self, w: int, h: int) -> QPainterPath:
|
||||
cfg = self._cfg
|
||||
shadow_path = QPainterPath()
|
||||
shadow_path.moveTo(w * RIBBON_PEEL_START_RATIO, h)
|
||||
shadow_path.moveTo(w * cfg.get("peel_start_ratio", 0.32), h)
|
||||
shadow_path.quadTo(
|
||||
w * RIBBON_PEEL_MID_RATIO,
|
||||
w * cfg.get("peel_mid_ratio", 0.58),
|
||||
h,
|
||||
w * RIBBON_PEEL_END_RATIO,
|
||||
h * RIBBON_PEEL_MID_RATIO,
|
||||
w * cfg.get("peel_end_ratio", 0.82),
|
||||
h * cfg.get("peel_mid_ratio", 0.58),
|
||||
)
|
||||
shadow_path.quadTo(
|
||||
w,
|
||||
h * RIBBON_PEEL_MID_RATIO,
|
||||
h * cfg.get("peel_mid_ratio", 0.58),
|
||||
w,
|
||||
h * RIBBON_PEEL_START_RATIO,
|
||||
h * cfg.get("peel_start_ratio", 0.32),
|
||||
)
|
||||
return shadow_path
|
||||
|
||||
@@ -188,8 +173,9 @@ class SourceCorner(QWidget):
|
||||
|
||||
from portprotonqt.qt_utils import get_device_pixel_ratio
|
||||
|
||||
cfg = self._cfg
|
||||
dpr = get_device_pixel_ratio()
|
||||
icon_size = max(RIBBON_MIN_ICON_SIZE, int(w * RIBBON_ICON_SIZE_RATIO))
|
||||
icon_size = max(cfg.get("min_icon_size", 8), int(w * cfg.get("icon_size_ratio", 0.25)))
|
||||
render_size = int(icon_size * dpr)
|
||||
|
||||
if isinstance(self._icon, str):
|
||||
@@ -199,9 +185,10 @@ class SourceCorner(QWidget):
|
||||
else:
|
||||
return
|
||||
|
||||
center_ratio = cfg.get("icon_center_ratio", 0.84)
|
||||
painter.drawPixmap(
|
||||
int(w * RIBBON_ICON_CENTER_RATIO - icon_size / 2),
|
||||
int(h * RIBBON_ICON_CENTER_RATIO - icon_size / 2),
|
||||
int(w * center_ratio - icon_size / 2),
|
||||
int(h * center_ratio - icon_size / 2),
|
||||
icon_size,
|
||||
icon_size,
|
||||
pixmap
|
||||
@@ -345,11 +332,10 @@ class GameCard(QFrame):
|
||||
self.protondbLabel.setVisible(False)
|
||||
|
||||
steam_icon = self.theme_manager.get_icon("badge_steam", as_path=True)
|
||||
corner_colors = self.theme.get_source_corner_colors()
|
||||
corner_config = self.theme.get_source_corner_config()
|
||||
self.steamLabel = SourceCorner(
|
||||
icon=steam_icon,
|
||||
color=corner_colors["color"],
|
||||
fold_color=corner_colors["fold_color"],
|
||||
config=corner_config,
|
||||
parent=self.coverWidget,
|
||||
)
|
||||
self.steamLabel.setVisible(self.steam_visible)
|
||||
@@ -359,8 +345,7 @@ class GameCard(QFrame):
|
||||
portproton_icon = self.theme_manager.get_icon("badge_portproton", as_path=True)
|
||||
self.portprotonLabel = SourceCorner(
|
||||
icon=portproton_icon,
|
||||
color=corner_colors["color"],
|
||||
fold_color=corner_colors["fold_color"],
|
||||
config=corner_config,
|
||||
parent=self.coverWidget,
|
||||
)
|
||||
self.portprotonLabel.setVisible(self.portproton_visible)
|
||||
@@ -585,8 +570,9 @@ class GameCard(QFrame):
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
ribbon_size = int(current_width * RIBBON_SIZE_RATIO)
|
||||
ribbon_size = max(ribbon_size, int(RIBBON_MIN_SIZE * self._scale))
|
||||
ribbon_cfg = getattr(self.theme, "SOURCE_CORNER", {})
|
||||
ribbon_size = int(current_width * ribbon_cfg.get("size_ratio", 0.28))
|
||||
ribbon_size = max(ribbon_size, int(ribbon_cfg.get("min_size", 54) * self._scale))
|
||||
source_ribbons = [
|
||||
(self.steam_visible, self.steamLabel),
|
||||
(self.portproton_visible, self.portprotonLabel),
|
||||
@@ -631,8 +617,8 @@ class GameCard(QFrame):
|
||||
self.coverWidget.setContentsMargins(10, 0, 0, 0)
|
||||
self.coverLabel.setFixedSize(icon_size, icon_size)
|
||||
else:
|
||||
small_card_mode = self.base_card_width < COMPACT_CARD_WIDTH_THRESHOLD
|
||||
height_ratio = COMPACT_CARD_HEIGHT_RATIO if small_card_mode else 1.8
|
||||
small_card_mode = self.base_card_width < self.theme.COMPACT_CARD["width_threshold"]
|
||||
height_ratio = self.theme.COMPACT_CARD["height_ratio"] if small_card_mode else 1.8
|
||||
scaled_height = int(self.base_card_width * height_ratio * self._scale)
|
||||
self.setFixedSize(scaled_width + scaled_extra, scaled_height + scaled_extra)
|
||||
self.coverWidget.setFixedSize(scaled_width, int(scaled_width * 1.5))
|
||||
@@ -652,7 +638,7 @@ class GameCard(QFrame):
|
||||
icon_space = max(2, int(badge_host_width * 0.012))
|
||||
compact_badge_width = int(badge_host_width * 0.12)
|
||||
compact_badge_width = max(compact_badge_width, icon_size + icon_space + 8)
|
||||
small_card_mode = not self.list_layout and self.base_card_width < COMPACT_CARD_WIDTH_THRESHOLD
|
||||
small_card_mode = not self.list_layout and self.base_card_width < self.theme.COMPACT_CARD["width_threshold"]
|
||||
compact_badge = self.badge_view_mode == "compact" or small_card_mode
|
||||
hidden_badges = self.badge_view_mode == "hidden"
|
||||
protondb_visible = is_valid_protondb_tier(self.protondb_tier) and not self.economy_mode
|
||||
@@ -682,7 +668,7 @@ class GameCard(QFrame):
|
||||
if self.base_font_size is not None:
|
||||
try:
|
||||
font = self.nameLabel.font()
|
||||
title_scale = COMPACT_CARD_TITLE_SCALE if small_card_mode else 1.0
|
||||
title_scale = self.theme.COMPACT_CARD["title_scale"] if small_card_mode else 1.0
|
||||
new_font_size = self.base_font_size * self._scale * title_scale
|
||||
if new_font_size > 0:
|
||||
font.setPointSizeF(new_font_size)
|
||||
@@ -843,7 +829,7 @@ class GameCard(QFrame):
|
||||
if not current_line:
|
||||
current_line = metrics.elidedText(word, Qt.TextElideMode.ElideRight, max_width)
|
||||
continue
|
||||
if len(lines) >= COMPACT_CARD_TITLE_LINES - 1:
|
||||
if len(lines) >= self.theme.COMPACT_CARD["title_lines"] - 1:
|
||||
rest = " ".join([current_line, *words[index:]]).strip()
|
||||
lines.append(metrics.elidedText(rest, Qt.TextElideMode.ElideRight, max_width))
|
||||
return "\n".join(lines)
|
||||
@@ -852,11 +838,11 @@ class GameCard(QFrame):
|
||||
current_line = word
|
||||
|
||||
if current_line:
|
||||
if len(lines) >= COMPACT_CARD_TITLE_LINES:
|
||||
if len(lines) >= self.theme.COMPACT_CARD["title_lines"]:
|
||||
lines[-1] = metrics.elidedText(lines[-1], Qt.TextElideMode.ElideRight, max_width)
|
||||
else:
|
||||
lines.append(current_line)
|
||||
return "\n".join(lines[:COMPACT_CARD_TITLE_LINES])
|
||||
return "\n".join(lines[:self.theme.COMPACT_CARD["title_lines"]])
|
||||
|
||||
@staticmethod
|
||||
def _extract_executable_path(exec_line: str) -> str:
|
||||
|
||||
@@ -68,7 +68,7 @@ class Preloader(QWidget):
|
||||
except FileNotFoundError:
|
||||
theme = load_theme("standart")
|
||||
|
||||
for attr_name in ("color_accent_blue", "color_a"):
|
||||
for attr_name in ("color_preloader", "color_accent_blue", "color_accent"):
|
||||
if not hasattr(theme, attr_name):
|
||||
continue
|
||||
parsed = self._parse_color_string(getattr(theme, attr_name))
|
||||
|
||||
@@ -1807,8 +1807,8 @@ def build_command(args: argparse.Namespace) -> list[str]:
|
||||
|
||||
def apply_palette(widget: QPlainTextEdit, theme: object | None) -> None:
|
||||
"""Apply terminal colors from the selected theme."""
|
||||
background_color = _theme_color(theme, "color_b")
|
||||
foreground_color = _theme_color(theme, "color_f")
|
||||
background_color = _theme_color(theme, "color_bg")
|
||||
foreground_color = _theme_color(theme, "color_text")
|
||||
selection_f = _theme_color(theme, "color_selection_f")
|
||||
selection_b = _theme_color(theme, "color_selection_b")
|
||||
opacity = getattr(theme, "background_opacity", 1.0)
|
||||
|
||||
@@ -95,32 +95,83 @@ GAME_CARD_ANIMATION = {
|
||||
|
||||
# VARS
|
||||
font_family = "Play"
|
||||
font_size_a = "16px"
|
||||
font_size_b = "24px"
|
||||
border_a = "0px solid"
|
||||
border_b = "1px solid"
|
||||
border_c = "2px solid"
|
||||
border_radius_a = "10px"
|
||||
border_radius_b = "15px"
|
||||
color_a = "#70b8ff"
|
||||
color_b = "#F8F9FC"
|
||||
color_c = "#F0F2F5"
|
||||
color_d = "#E9ECEF"
|
||||
color_e = "#DEE2E6"
|
||||
color_f = "#ffffff"
|
||||
color_g = "rgba(0, 0, 0, 0)"
|
||||
color_h = "transparent"
|
||||
color_i = "rgba(40, 42, 51, 0.9)"
|
||||
color_j = "#d2d3db"
|
||||
color_k = "#9394a5"
|
||||
color_l = "#212529"
|
||||
font_size_normal = "16px"
|
||||
font_size_header = "24px"
|
||||
border_none = "0px solid"
|
||||
border_thin = "1px solid"
|
||||
border_medium = "2px solid"
|
||||
border_radius_small = "10px"
|
||||
border_radius_large = "15px"
|
||||
border_radius_card = "20px"
|
||||
border_radius_badge = "5px"
|
||||
color_accent = "#70b8ff"
|
||||
color_bg = "#F8F9FC"
|
||||
color_surface = "#F0F2F5"
|
||||
color_surface_elevated = "#E9ECEF"
|
||||
color_surface_hover = "#DEE2E6"
|
||||
color_text = "#ffffff"
|
||||
color_transparent = "transparent"
|
||||
color_overlay = "rgba(40, 42, 51, 0.9)"
|
||||
color_surface_light = "#d2d3db"
|
||||
color_surface_mid = "#9394a5"
|
||||
color_text_dark = "#212529"
|
||||
combo_disabled_bg = "#dee2e6"
|
||||
combo_disabled_border = "#dee2e6"
|
||||
combo_disabled_text = "#777a84"
|
||||
color_nav_inactive = "#7f7f7f"
|
||||
color_separator = "#7f7f7f"
|
||||
color_scrollbar_bg = "rgba(20, 20, 20, 0.20)"
|
||||
color_scrollbar_handle = "#bfbfbf"
|
||||
color_border_subtle = "rgba(255, 255, 255, 0.01)"
|
||||
color_border_input = "rgba(255, 255, 255, 0.5)"
|
||||
color_border_light = "rgba(255, 255, 255, 0.2)"
|
||||
color_border_faint = "rgba(255, 255, 255, 0.05)"
|
||||
color_checkbox_unchecked_bg = "rgba(255, 255, 255, 0.1)"
|
||||
color_checkbox_hover_bg = "rgba(255, 255, 255, 0.2)"
|
||||
color_favorite_star = "gold"
|
||||
color_badge_steam_bg = "rgba(0, 0, 0, 0.5)"
|
||||
color_badge_steam_text = "white"
|
||||
color_badge_default_bg = "rgba(0, 0, 0, 0.5)"
|
||||
color_badge_default_text = "white"
|
||||
color_detail_overlay = "rgba(220, 222, 226, 0.40)"
|
||||
color_cover_frame_bg = "rgba(233, 236, 239, 0.80)"
|
||||
color_no_cover_bg = "rgba(220,222,226,0.95)"
|
||||
color_detail_line = "rgba(0,0,0,0.12)"
|
||||
color_preview_btn_bg = "rgba(0, 0, 0, 0.5)"
|
||||
color_preview_btn_text = "white"
|
||||
SOURCE_CORNER = {
|
||||
"ribbon_color": color_surface,
|
||||
"ribbon_fold_color": "#00000096",
|
||||
"size_ratio": 0.28,
|
||||
"min_size": 54,
|
||||
"min_widget_size": 4,
|
||||
"peel_start_ratio": 0.32,
|
||||
"peel_mid_ratio": 0.58,
|
||||
"peel_end_ratio": 0.82,
|
||||
"peel_shadow_width": 3,
|
||||
"fold_start_ratio": 0.60,
|
||||
"fold_end_ratio": 0.92,
|
||||
"icon_center_ratio": 0.84,
|
||||
"icon_size_ratio": 0.25,
|
||||
"min_icon_size": 8,
|
||||
"gradient_start": 0.0,
|
||||
"gradient_end": 1.0,
|
||||
"gradient_lighter": 145,
|
||||
"gradient_darker": 112,
|
||||
"fold_darker": 132,
|
||||
}
|
||||
|
||||
|
||||
def get_source_corner_config() -> dict:
|
||||
return SOURCE_CORNER
|
||||
|
||||
|
||||
LIBRARY_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
background: qradialgradient(
|
||||
cx:0.5, cy:0.5, radius:0.8,
|
||||
stop:0 {color_j},
|
||||
stop:1 {color_k}
|
||||
stop:0 {color_surface_light},
|
||||
stop:1 {color_surface_mid}
|
||||
);
|
||||
border-radius: 0px;
|
||||
}}
|
||||
@@ -128,15 +179,15 @@ LIBRARY_WIDGET_STYLE = f"""
|
||||
|
||||
SETTINGS_TITLE_STYLE = f"""
|
||||
QLabel {{
|
||||
color: {color_l};
|
||||
color: {color_text_dark};
|
||||
height: 34px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
padding: 7px;
|
||||
background: {color_b};
|
||||
border-radius: {border_radius_a};
|
||||
border: {border_a} {color_c};
|
||||
background: {color_bg};
|
||||
border-radius: {border_radius_small};
|
||||
border: {border_none} {color_surface};
|
||||
min-width: 320px;
|
||||
}}
|
||||
"""
|
||||
@@ -145,15 +196,15 @@ SETTINGS_TITLE_STYLE = f"""
|
||||
QGROUP_BOX_STYLE = f"""
|
||||
QGroupBox {{
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
color: {color_l};
|
||||
border: {border_b} {color_c};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_text_dark};
|
||||
border: {border_thin} {color_surface};
|
||||
border-radius: {border_radius_small};
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
padding-top: 5px;
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QGroupBox::title {{
|
||||
subcontrol-origin: margin;
|
||||
@@ -171,46 +222,46 @@ GAME_CARD_WINDOW_STYLE = f"""
|
||||
stop:0.3 rgba(233, 236, 239, 0.9),
|
||||
stop:0.7 rgba(210, 211, 219, 0.9),
|
||||
stop:1 rgba(180, 190, 200, 0.9));
|
||||
border: {border_c} {color_f};
|
||||
border: {border_medium} {color_text};
|
||||
}}
|
||||
"""
|
||||
|
||||
# COVER LABEL BORDER RADIUS
|
||||
COVER_LABEL_STYLE = f"border-radius: {border_radius_b};"
|
||||
COVER_LABEL_STYLE = f"border-radius: {border_radius_large};"
|
||||
|
||||
# DETAILS WIDGET (TEXT, DESCRIPTION)
|
||||
DETAILS_WIDGET_STYLE = f"background: rgba(20,20,20,0.40); border-radius: {border_radius_b}; padding: 10px;"
|
||||
DETAILS_WIDGET_STYLE = f"background: {color_detail_overlay}; border-radius: {border_radius_large}; padding: 10px;"
|
||||
COMPACT_DETAILS_WIDGET_STYLE = f"""
|
||||
QFrame, QWidget {{
|
||||
background: qradialgradient(
|
||||
cx:0.5, cy:0.5, radius:0.8,
|
||||
stop:0 #E9ECEF,
|
||||
stop:1 {color_j}
|
||||
stop:1 {color_surface_light}
|
||||
);
|
||||
border-radius: {border_radius_b};
|
||||
border-radius: {border_radius_large};
|
||||
padding: 10px;
|
||||
}}
|
||||
"""
|
||||
|
||||
# TITLE (HEADER) ON DETAIL PAGE
|
||||
DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_a};"
|
||||
COMPACT_DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_l}; background: {color_h};"
|
||||
DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_accent};"
|
||||
COMPACT_DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_text_dark}; background: {color_transparent};"
|
||||
|
||||
# DIVIDER LINE
|
||||
DETAIL_PAGE_LINE_STYLE = f"background: {color_h}; margin: 0 0;"
|
||||
DETAIL_PAGE_LINE_STYLE = f"background: {color_transparent}; margin: 0 0;"
|
||||
|
||||
# DESCRIPTION TEXT
|
||||
DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_a}; color: {color_l}; line-height: 1.5;"
|
||||
COMPACT_DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_a}; color: {color_l}; line-height: 1.5; background: {color_h};"
|
||||
DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_normal}; color: {color_text_dark}; line-height: 1.5;"
|
||||
COMPACT_DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_normal}; color: {color_text_dark}; line-height: 1.5; background: {color_transparent};"
|
||||
|
||||
# PLAYTIME WIDGET (PLAYTIME)
|
||||
COMPACT_PLAYTIME_WIDGET_STYLE = f"background: {color_h}; border-radius: {border_radius_b}; padding: 10px;"
|
||||
COMPACT_PLAYTIME_WIDGET_STYLE = f"background: {color_transparent}; border-radius: {border_radius_large}; padding: 10px;"
|
||||
|
||||
# ADDITIONAL INFO STYLES ON GAMES PAGE
|
||||
LAST_LAUNCH_TITLE_STYLE = f"max-height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_j}); font-family: '{font_family}'; font-size: 11px; color: {color_l}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_VALUE_STYLE = f"height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_j}); font-family: '{font_family}'; font-size: 13px; color: {color_l}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_TITLE_STYLE = f"max-height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_j}); font-family: '{font_family}'; font-size: 11px; color: {color_l}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_VALUE_STYLE = f"height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_j}); font-family: '{font_family}'; font-size: 13px; color: {color_l}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_TITLE_STYLE = f"max-height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_surface_light}); font-family: '{font_family}'; font-size: 11px; color: {color_text_dark}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_VALUE_STYLE = f"height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_surface_light}); font-family: '{font_family}'; font-size: 13px; color: {color_text_dark}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_TITLE_STYLE = f"max-height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_surface_light}); font-family: '{font_family}'; font-size: 11px; color: {color_text_dark}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_VALUE_STYLE = f"height: 16px; background: qradialgradient(cx:0.5, cy:0.5, radius:0.8,stop:0 #E9ECEF,stop:1 {color_surface_light}); font-family: '{font_family}'; font-size: 13px; color: {color_text_dark}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
|
||||
# PLAY BUTTON STYLE
|
||||
PLAY_BUTTON_STYLE = f"""
|
||||
@@ -218,13 +269,13 @@ PLAY_BUTTON_STYLE = f"""
|
||||
background: qradialgradient(
|
||||
cx:0.5, cy:0.5, radius:0.8,
|
||||
stop:0 #E9ECEF,
|
||||
stop:1 {color_j}
|
||||
stop:1 {color_surface_light}
|
||||
);
|
||||
border: {border_b} {color_f};
|
||||
border-radius: {border_radius_a};
|
||||
font-size: {font_size_a};
|
||||
border: {border_thin} {color_text};
|
||||
border-radius: {border_radius_small};
|
||||
font-size: {font_size_normal};
|
||||
margin-top: 15px;
|
||||
color: {color_l};
|
||||
color: {color_text_dark};
|
||||
font-weight: bold;
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 10px;
|
||||
@@ -232,13 +283,13 @@ PLAY_BUTTON_STYLE = f"""
|
||||
min-height: 30px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -248,26 +299,26 @@ ADDGAME_BACK_BUTTON_STYLE = f"""
|
||||
background: qradialgradient(
|
||||
cx:0.5, cy:0.5, radius:0.8,
|
||||
stop:0 #E9ECEF,
|
||||
stop:1 {color_j}
|
||||
stop:1 {color_surface_light}
|
||||
);
|
||||
border: {border_b} {color_f};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_l};
|
||||
font-size: {font_size_a};
|
||||
border: {border_thin} {color_text};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text_dark};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 10px;
|
||||
min-width: 120px;
|
||||
min-height: 25px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
background: {color_a};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -276,12 +327,12 @@ LIBRARY_CONTROLS_BUTTON_STYLE = f"""
|
||||
background: qradialgradient(
|
||||
cx:0.5, cy:0.5, radius:0.8,
|
||||
stop:0 #E9ECEF,
|
||||
stop:1 {color_j}
|
||||
stop:1 {color_surface_light}
|
||||
);
|
||||
border: {border_b} {color_f};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_l};
|
||||
font-size: {font_size_a};
|
||||
border: {border_thin} {color_text};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text_dark};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 10px;
|
||||
min-width: 24px;
|
||||
@@ -294,33 +345,33 @@ LIBRARY_CONTROLS_BUTTON_STYLE = f"""
|
||||
background: qradialgradient(
|
||||
cx:0.5, cy:0.5, radius:0.8,
|
||||
stop:0 #E9ECEF,
|
||||
stop:1 {color_j}
|
||||
stop:1 {color_surface_light}
|
||||
);
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
QComboBox {{
|
||||
background: {color_b};
|
||||
border: {border_b} {color_f};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_bg};
|
||||
border: {border_thin} {color_text};
|
||||
border-radius: {border_radius_small};
|
||||
padding-left: 12px;
|
||||
height: 30px;
|
||||
color: {color_l};
|
||||
color: {color_text_dark};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
min-width: 120px;
|
||||
combobox-popup: 0;
|
||||
}}
|
||||
QComboBox:hover,
|
||||
QComboBox:focus{{
|
||||
background: {color_b};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_bg};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
QComboBox:on {{
|
||||
background: {color_b};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_bg};
|
||||
border: {border_thin} {color_accent};
|
||||
border-bottom-style: none;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
@@ -330,7 +381,7 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
QComboBox::drop-down {{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center right;
|
||||
border-left: {border_b} rgba(255, 255, 255, 0.05);
|
||||
border-left: {border_thin} rgba(255, 255, 255, 0.05);
|
||||
padding: 12px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
@@ -349,8 +400,8 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
}}
|
||||
QComboBox QAbstractItemView {{
|
||||
outline: none;
|
||||
background: {color_c};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_thin} {color_accent};
|
||||
border-top-style: none;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
@@ -361,127 +412,127 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
padding: 3px 3px 3px 6px;
|
||||
margin: 1px;
|
||||
min-height: 24px;
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_l};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text_dark};
|
||||
}}
|
||||
QComboBox QAbstractItemView::item:hover,
|
||||
QComboBox QAbstractItemView::item:selected {{
|
||||
background: {color_a};
|
||||
color: {color_l};
|
||||
background: {color_accent};
|
||||
color: {color_text_dark};
|
||||
}}
|
||||
"""
|
||||
|
||||
# SEARCH FIELD STYLE
|
||||
SEARCH_EDIT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_b};
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_bg};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
padding: 5px 10px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
color: {color_l};
|
||||
font-size: {font_size_normal};
|
||||
color: {color_text_dark};
|
||||
min-height: 25px;
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# NAVIGATION TAB BUTTON STYLE
|
||||
NAV_BUTTON_STYLE = f"""
|
||||
NavLabel {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
padding: 6px 3px;
|
||||
margin: 10px 0 10px 10px;
|
||||
color: {color_i};
|
||||
color: {color_overlay};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
text-transform: uppercase;
|
||||
border: {color_a};
|
||||
border: {color_accent};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
NavLabel[checked = true] {{
|
||||
background: {color_h};
|
||||
color: {color_l};
|
||||
background: {color_transparent};
|
||||
color: {color_text_dark};
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
border-bottom: {border_c} {color_a};
|
||||
border-bottom: {border_medium} {color_accent};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
NavLabel:hover {{
|
||||
background: {color_h};
|
||||
color: {color_l};
|
||||
border-bottom: {border_c} #7f7f7f;
|
||||
background: {color_transparent};
|
||||
color: {color_text_dark};
|
||||
border-bottom: {border_medium} #7f7f7f;
|
||||
}}
|
||||
NavLabel[checked = true]:hover {{
|
||||
background: {color_h};
|
||||
color: {color_l};
|
||||
border-bottom: {border_c} {color_a};
|
||||
background: {color_transparent};
|
||||
color: {color_text_dark};
|
||||
border-bottom: {border_medium} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
WINETRICKS_TABBLE_STYLE = f"""
|
||||
QTableWidget {{
|
||||
background: {color_h};
|
||||
color: {color_l};
|
||||
gridline-color: {color_h};
|
||||
alternate-background-color: {color_e};
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_transparent};
|
||||
color: {color_text_dark};
|
||||
gridline-color: {color_transparent};
|
||||
alternate-background-color: {color_surface_hover};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QHeaderView::section {{
|
||||
background: {color_d};
|
||||
color: {color_l};
|
||||
background: {color_surface_elevated};
|
||||
color: {color_text_dark};
|
||||
padding: 2px;
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
font-weight: bold;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTableWidget::item {{
|
||||
padding: 3px;
|
||||
border-bottom: {border_a } {color_c};
|
||||
border-bottom: {border_none } {color_surface};
|
||||
height: 32px;
|
||||
}}
|
||||
QTableWidget::item:selected,
|
||||
QTableWidget::item:focus,
|
||||
QTableWidget::item:selected:focus {{
|
||||
background: {color_a};
|
||||
color: {color_l};
|
||||
selection-background-color: {color_a};
|
||||
background: {color_accent};
|
||||
color: {color_text_dark};
|
||||
selection-background-color: {color_accent};
|
||||
}}
|
||||
QTableWidget::item:hover {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QTableWidget::item:selected:hover {{
|
||||
background: {color_a};
|
||||
color: {color_l};
|
||||
background: {color_accent};
|
||||
color: {color_text_dark};
|
||||
}}
|
||||
"""
|
||||
|
||||
# COMBOBOX
|
||||
COMBOBOX_STYLE = f"""
|
||||
QComboBox {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
padding-left: 12px;
|
||||
height: 30px;
|
||||
color: {color_l};
|
||||
color: {color_text_dark};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
min-width: 120px;
|
||||
combobox-popup: 0;
|
||||
}}
|
||||
QComboBox:on {{
|
||||
background: {color_b};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_bg};
|
||||
border: {border_medium} {color_accent};
|
||||
border-bottom-style: none;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
@@ -489,23 +540,23 @@ COMBOBOX_STYLE = f"""
|
||||
border-bottom-right-radius: 0px;
|
||||
}}
|
||||
QComboBox:hover {{
|
||||
border: {border_c} {color_a};
|
||||
background: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background: {color_accent};
|
||||
}}
|
||||
/* Focus state */
|
||||
QComboBox:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
QComboBox:disabled {{
|
||||
background: {color_e};
|
||||
border: {border_c} {color_e};
|
||||
color: #777a84;
|
||||
background: {color_surface_hover};
|
||||
border: {border_medium} {color_surface_hover};
|
||||
color: {combo_disabled_text};
|
||||
}}
|
||||
QComboBox::drop-down {{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center right;
|
||||
border-left: {border_b} rgba(255, 255, 255, 0.05);
|
||||
border-left: {border_thin} rgba(255, 255, 255, 0.05);
|
||||
padding: 12px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
@@ -525,8 +576,8 @@ COMBOBOX_STYLE = f"""
|
||||
/* List when combobox is open */
|
||||
QComboBox QAbstractItemView {{
|
||||
outline: none;
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
border-top-style: none;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
@@ -534,109 +585,109 @@ COMBOBOX_STYLE = f"""
|
||||
border-bottom-right-radius: 10px;
|
||||
}}
|
||||
QComboBox:editable {{
|
||||
background: {color_c};
|
||||
background: {color_surface};
|
||||
}}
|
||||
QComboBox::drop-down:editable:focus {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}}
|
||||
QListView {{
|
||||
background: {color_c};
|
||||
background: {color_surface};
|
||||
}}
|
||||
QListView::item {{
|
||||
padding: 3px 3px 3px 6px;
|
||||
margin: 1px;
|
||||
min-height: 24px;
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_l};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text_dark};
|
||||
}}
|
||||
QListView::item:hover {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QListView::item:selected {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
/* Selection in list when item is focused */
|
||||
QListView::item:focus {{
|
||||
background: {color_a};
|
||||
color: {color_l};
|
||||
background: {color_accent};
|
||||
color: {color_text_dark};
|
||||
}}
|
||||
"""
|
||||
|
||||
SETTINGS_TABLE_COMBOBOX_STYLE = f"""
|
||||
QComboBox#settingsTableCombo:hover,
|
||||
QComboBox#settingsTableCombo:focus {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
LINE_EDIT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_c};
|
||||
border: {border_c} rgba(255, 255, 255, 0.01);
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} rgba(255, 255, 255, 0.01);
|
||||
border-radius: {border_radius_small};
|
||||
height: 30px;
|
||||
padding-left: 12px;
|
||||
color: {color_l};
|
||||
color: {color_text_dark};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_e};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_surface_hover};
|
||||
}}
|
||||
"""
|
||||
|
||||
ADDGAME_INPUT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
height: 30px;
|
||||
padding-left: 12px;
|
||||
color: {color_l};
|
||||
color: {color_text_dark};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_e};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_surface_hover};
|
||||
}}
|
||||
"""
|
||||
|
||||
TAB_STYLE = f"""
|
||||
QTabWidget::pane {{
|
||||
border-top: 1px solid {color_c};
|
||||
background: {color_h};
|
||||
border-top: 1px solid {color_surface};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QTabBar::tab {{
|
||||
background: {color_c};
|
||||
color: {color_l};
|
||||
background: {color_surface};
|
||||
color: {color_text_dark};
|
||||
padding: 6px 12px;
|
||||
border-top-left-radius: {border_radius_a};
|
||||
border-top-right-radius: {border_radius_a};
|
||||
border-top-left-radius: {border_radius_small};
|
||||
border-top-right-radius: {border_radius_small};
|
||||
margin-right: 2px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTabBar::tab:selected {{
|
||||
background: {color_a};
|
||||
color: {color_l};
|
||||
background: {color_accent};
|
||||
color: {color_text_dark};
|
||||
}}
|
||||
QTabBar::tab:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -650,49 +701,49 @@ HINT_BAR_STYLE = f"""
|
||||
# ACTION BUTTONS STYLE (SAVE, APPLY, ETC.)
|
||||
ACTION_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_b};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_l};
|
||||
font-size: {font_size_a};
|
||||
background: {color_bg};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text_dark};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 16px;
|
||||
min-height: 20px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# ACTION BUTTON ACTIVE STYLE (MANGOHUD, GAMESCOPE ETC.)
|
||||
ACTION_BUTTON_ACTIVE_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_l};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text_dark};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 16px;
|
||||
min-height: 20px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
@@ -73,24 +73,62 @@ GAME_CARD_ANIMATION = {
|
||||
"detail_page_easing_curve_exit": "InCubic",
|
||||
}
|
||||
|
||||
# VARS
|
||||
# === Typography ===
|
||||
font_family = "Play"
|
||||
font_size_a = "16px"
|
||||
font_size_b = "24px"
|
||||
border_a = "0px solid"
|
||||
border_b = "1px solid"
|
||||
border_c = "2px solid"
|
||||
border_radius_a = "10px"
|
||||
border_radius_b = "15px"
|
||||
color_a = "#409EFF"
|
||||
color_b = "#282a33"
|
||||
color_c = "#3f424d"
|
||||
color_d = "#32343d"
|
||||
color_e = "#404554"
|
||||
color_f = "#ffffff"
|
||||
color_g = "rgba(0, 0, 0, 0)"
|
||||
color_h = "transparent"
|
||||
color_i = "rgba(40, 42, 51, 0.9)"
|
||||
font_size_small = "11px"
|
||||
font_size_normal = "16px"
|
||||
font_size_value = "13px"
|
||||
font_size_keyboard = "14px"
|
||||
font_size_header = "24px"
|
||||
font_size_play = "18px"
|
||||
font_size_title = "32px"
|
||||
|
||||
# === Borders ===
|
||||
border_none = "0px solid"
|
||||
border_thin = "1px solid"
|
||||
border_medium = "2px solid"
|
||||
border_radius_small = "10px"
|
||||
border_radius_large = "15px"
|
||||
border_radius_card = "20px"
|
||||
border_radius_badge = "5px"
|
||||
|
||||
# === Core Palette ===
|
||||
color_accent = "#409EFF"
|
||||
color_bg = "#282a33"
|
||||
color_surface = "#3f424d"
|
||||
color_surface_elevated = "#32343d"
|
||||
color_surface_hover = "#404554"
|
||||
color_text = "#ffffff"
|
||||
color_transparent = "transparent"
|
||||
color_overlay = "rgba(40, 42, 51, 0.9)"
|
||||
|
||||
# === Widget State Colors ===
|
||||
color_combo_disabled_bg = "#2a2c35"
|
||||
color_combo_disabled_border = "#2a2c35"
|
||||
color_combo_disabled_text = "#777a84"
|
||||
|
||||
# === Navigation ===
|
||||
color_nav_inactive = "#7f7f7f"
|
||||
color_separator = "#7f7f7f"
|
||||
|
||||
# === Scrollbar ===
|
||||
color_scrollbar_bg = "rgba(20, 20, 20, 0.30)"
|
||||
color_scrollbar_handle = "#bebebe"
|
||||
|
||||
# === Border Variants ===
|
||||
color_border_subtle = "rgba(255, 255, 255, 0.01)"
|
||||
color_border_input = "rgba(255, 255, 255, 0.5)"
|
||||
color_border_light = "rgba(255, 255, 255, 0.2)"
|
||||
color_border_faint = "rgba(255, 255, 255, 0.05)"
|
||||
|
||||
# === Detail Page ===
|
||||
color_detail_overlay = "rgba(20, 20, 20, 0.40)"
|
||||
color_detail_line = "rgba(255,255,255,0.12)"
|
||||
|
||||
# === Preview Buttons ===
|
||||
color_preview_btn_bg = "rgba(0, 0, 0, 0.5)"
|
||||
color_preview_btn_text = "white"
|
||||
|
||||
|
||||
LIBRARY_WIDGET_STYLE = """
|
||||
QWidget {
|
||||
@@ -117,31 +155,31 @@ GAME_CARD_WINDOW_STYLE = """
|
||||
"""
|
||||
|
||||
# COVER LABEL BORDER RADIUS
|
||||
COVER_LABEL_STYLE = f"border-radius: {border_radius_b};"
|
||||
COVER_LABEL_STYLE = f"border-radius: {border_radius_large};"
|
||||
|
||||
# DETAILS WIDGET (TEXT, DESCRIPTION)
|
||||
DETAILS_WIDGET_STYLE = f"background: rgba(20,20,20,0.40); border-radius: {border_radius_b}; padding: 10px;"
|
||||
COMPACT_DETAILS_WIDGET_STYLE = f"background: rgba(20,20,20,0.40); border-radius: {border_radius_b}; padding: 10px;"
|
||||
DETAILS_WIDGET_STYLE = f"background: {color_detail_overlay}; border-radius: {border_radius_large}; padding: 10px;"
|
||||
COMPACT_DETAILS_WIDGET_STYLE = f"background: {color_detail_overlay}; border-radius: {border_radius_large}; padding: 10px;"
|
||||
|
||||
# TITLE (HEADER) ON DETAIL PAGE
|
||||
DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_a};"
|
||||
COMPACT_DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_a}; background: {color_h};"
|
||||
DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: {font_size_title}; color: {color_accent};"
|
||||
COMPACT_DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: {font_size_title}; color: {color_accent}; background: {color_transparent};"
|
||||
|
||||
# DIVIDER LINE
|
||||
DETAIL_PAGE_LINE_STYLE = "color: rgba(255,255,255,0.12); margin: 0 0;"
|
||||
DETAIL_PAGE_LINE_STYLE = f"color: {color_detail_line}; margin: 0 0;"
|
||||
|
||||
# DESCRIPTION TEXT
|
||||
DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_a}; color: {color_f}; line-height: 1.5;"
|
||||
COMPACT_DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_a}; color: {color_f}; line-height: 1.5; background: {color_h};"
|
||||
DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_normal}; color: {color_text}; line-height: 1.5;"
|
||||
COMPACT_DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_normal}; color: {color_text}; line-height: 1.5; background: {color_transparent};"
|
||||
|
||||
# PLAYTIME WIDGET (PLAYTIME)
|
||||
COMPACT_PLAYTIME_WIDGET_STYLE = f"background: {color_h}; border-radius: {border_radius_b}; padding: 10px;"
|
||||
COMPACT_PLAYTIME_WIDGET_STYLE = f"background: {color_transparent}; border-radius: {border_radius_large}; padding: 10px;"
|
||||
|
||||
# ADDITIONAL INFO STYLES ON GAMES PAGE
|
||||
LAST_LAUNCH_TITLE_STYLE = f"max-height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 11px; color: {color_f}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_VALUE_STYLE = f"height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 13px; color: {color_f}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_TITLE_STYLE = f"max-height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 11px; color: {color_f}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_VALUE_STYLE = f"height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 13px; color: {color_f}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_TITLE_STYLE = f"max-height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_small}; color: {color_text}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_VALUE_STYLE = f"height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_value}; color: {color_text}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_TITLE_STYLE = f"max-height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_small}; color: {color_text}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_VALUE_STYLE = f"height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_value}; color: {color_text}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
|
||||
# PLAY BUTTON STYLE
|
||||
PLAY_BUTTON_STYLE = f"""
|
||||
@@ -151,11 +189,11 @@ PLAY_BUTTON_STYLE = f"""
|
||||
stop:0 #404554,
|
||||
stop:1 #30323d
|
||||
);
|
||||
border: {border_b} rgba(255, 255, 255, 0.1);
|
||||
border-radius: {border_radius_a};
|
||||
font-size: {font_size_a};
|
||||
border: {border_thin} {color_border_light};
|
||||
border-radius: {border_radius_small};
|
||||
font-size: {font_size_normal};
|
||||
margin-top: 15px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-weight: bold;
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 10px;
|
||||
@@ -163,13 +201,13 @@ PLAY_BUTTON_STYLE = f"""
|
||||
min-height: 30px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
"""
|
||||
# STYLE FOR "ADD GAME" AND "BACK" BUTTONS ON DETAIL PAGE AND LIBRARY
|
||||
@@ -180,24 +218,24 @@ ADDGAME_BACK_BUTTON_STYLE = f"""
|
||||
stop:0 #404554,
|
||||
stop:1 #30323d
|
||||
);
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 10px;
|
||||
min-width: 120px;
|
||||
min-height: 25px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
background: {color_a};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -208,10 +246,10 @@ LIBRARY_CONTROLS_BUTTON_STYLE = f"""
|
||||
stop:0 #404554,
|
||||
stop:1 #30323d
|
||||
);
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 10px;
|
||||
min-width: 24px;
|
||||
@@ -226,31 +264,31 @@ LIBRARY_CONTROLS_BUTTON_STYLE = f"""
|
||||
stop:0 #404554,
|
||||
stop:1 #30323d
|
||||
);
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
QComboBox {{
|
||||
background: {color_d};
|
||||
border: {border_b} {color_h};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface_elevated};
|
||||
border: {border_thin} {color_transparent};
|
||||
border-radius: {border_radius_small};
|
||||
padding-left: 12px;
|
||||
height: 30px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
min-width: 120px;
|
||||
combobox-popup: 0;
|
||||
}}
|
||||
QComboBox:hover,
|
||||
QComboBox:focus {{
|
||||
background: {color_a};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
QComboBox:on {{
|
||||
background: {color_d};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_surface_elevated};
|
||||
border: {border_thin} {color_accent};
|
||||
border-bottom-style: none;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
@@ -260,7 +298,7 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
QComboBox::drop-down {{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center right;
|
||||
border-left: {border_b} rgba(255, 255, 255, 0.05);
|
||||
border-left: {border_thin} {color_border_faint};
|
||||
padding: 12px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
@@ -279,8 +317,8 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
}}
|
||||
QComboBox QAbstractItemView {{
|
||||
outline: none;
|
||||
background: {color_c};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_thin} {color_accent};
|
||||
border-top-style: none;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
@@ -291,126 +329,126 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
padding: 3px 3px 3px 6px;
|
||||
margin: 1px;
|
||||
min-height: 24px;
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
}}
|
||||
QComboBox QAbstractItemView::item:hover,
|
||||
QComboBox QAbstractItemView::item:selected {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
"""
|
||||
|
||||
# SEARCH FIELD STYLE
|
||||
SEARCH_EDIT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_b};
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_bg};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
padding: 5px 10px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_normal};
|
||||
color: {color_text};
|
||||
min-height: 25px;
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# NAVIGATION TAB BUTTON STYLE
|
||||
NAV_BUTTON_STYLE = f"""
|
||||
NavLabel {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
padding: 6px 3px;
|
||||
margin: 10px 0 10px 10px;
|
||||
color: #7f7f7f;
|
||||
color: {color_nav_inactive};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
text-transform: uppercase;
|
||||
border: {color_a};
|
||||
border: {color_accent};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
NavLabel[checked = true] {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
border-bottom: {border_b} {color_a};
|
||||
border-bottom: {border_thin} {color_accent};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
NavLabel:hover {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
border-bottom: {border_b} #7f7f7f;
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
border-bottom: {border_thin} {color_nav_inactive};
|
||||
}}
|
||||
NavLabel[checked = true]:hover {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
border-bottom: {border_b} {color_a};
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
border-bottom: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
WINETRICKS_TABBLE_STYLE = f"""
|
||||
QTableWidget {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
gridline-color: {color_h};
|
||||
alternate-background-color: {color_d};
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
gridline-color: {color_transparent};
|
||||
alternate-background-color: {color_surface_elevated};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QHeaderView::section {{
|
||||
background: {color_d};
|
||||
color: {color_f};
|
||||
background: {color_surface_elevated};
|
||||
color: {color_text};
|
||||
padding: 2px;
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
font-weight: bold;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTableWidget::item {{
|
||||
padding: 3px;
|
||||
border-bottom: {border_a } {color_c};
|
||||
border-bottom: {border_none} {color_surface};
|
||||
height: 32px;
|
||||
}}
|
||||
QTableWidget::item:selected,
|
||||
QTableWidget::item:focus,
|
||||
QTableWidget::item:selected:focus {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
selection-background-color: {color_a};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
selection-background-color: {color_accent};
|
||||
}}
|
||||
QTableWidget::item:hover {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QTableWidget::item:selected:hover {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
"""
|
||||
|
||||
# COMBOBOX
|
||||
COMBOBOX_STYLE = f"""
|
||||
QComboBox {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
padding-left: 12px;
|
||||
height: 30px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
min-width: 120px;
|
||||
combobox-popup: 0;
|
||||
}}
|
||||
QComboBox:on {{
|
||||
background: {color_b};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_bg};
|
||||
border: {border_medium} {color_accent};
|
||||
border-bottom-style: none;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
@@ -418,23 +456,23 @@ COMBOBOX_STYLE = f"""
|
||||
border-bottom-right-radius: 0px;
|
||||
}}
|
||||
QComboBox:hover {{
|
||||
border: {border_c} {color_a};
|
||||
background: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background: {color_accent};
|
||||
}}
|
||||
/* Focus state */
|
||||
QComboBox:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
QComboBox:disabled {{
|
||||
background: #2a2c35;
|
||||
border: {border_c} #2a2c35;
|
||||
color: #777a84;
|
||||
background: {color_combo_disabled_bg};
|
||||
border: {border_medium} {color_combo_disabled_border};
|
||||
color: {color_combo_disabled_text};
|
||||
}}
|
||||
QComboBox::drop-down {{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center right;
|
||||
border-left: {border_b} rgba(255, 255, 255, 0.05);
|
||||
border-left: {border_thin} {color_border_faint};
|
||||
padding: 12px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
@@ -454,8 +492,8 @@ COMBOBOX_STYLE = f"""
|
||||
/* List when combobox is open */
|
||||
QComboBox QAbstractItemView {{
|
||||
outline: none;
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
border-top-style: none;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
@@ -463,109 +501,109 @@ COMBOBOX_STYLE = f"""
|
||||
border-bottom-right-radius: 10px;
|
||||
}}
|
||||
QComboBox:editable {{
|
||||
background: {color_c};
|
||||
background: {color_surface};
|
||||
}}
|
||||
QComboBox::drop-down:editable:focus {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}}
|
||||
QListView {{
|
||||
background: {color_c};
|
||||
background: {color_surface};
|
||||
}}
|
||||
QListView::item {{
|
||||
padding: 3px 3px 3px 6px;
|
||||
margin: 1px;
|
||||
min-height: 24px;
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
}}
|
||||
QListView::item:hover {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QListView::item:selected {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
/* Selection in list when item is focused */
|
||||
QListView::item:focus {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
"""
|
||||
|
||||
SETTINGS_TABLE_COMBOBOX_STYLE = f"""
|
||||
QComboBox#settingsTableCombo:hover,
|
||||
QComboBox#settingsTableCombo:focus {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
LINE_EDIT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_c};
|
||||
border: {border_c} rgba(255, 255, 255, 0.01);
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_border_subtle};
|
||||
border-radius: {border_radius_small};
|
||||
height: 30px;
|
||||
padding-left: 12px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_e};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_surface_hover};
|
||||
}}
|
||||
"""
|
||||
|
||||
ADDGAME_INPUT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
height: 30px;
|
||||
padding-left: 12px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_e};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_surface_hover};
|
||||
}}
|
||||
"""
|
||||
|
||||
TAB_STYLE = f"""
|
||||
QTabWidget::pane {{
|
||||
border-top: 1px solid {color_c};
|
||||
background: {color_h};
|
||||
border-top: 1px solid {color_surface};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QTabBar::tab {{
|
||||
background: {color_c};
|
||||
color: {color_f};
|
||||
background: {color_surface};
|
||||
color: {color_text};
|
||||
padding: 6px 12px;
|
||||
border-top-left-radius: {border_radius_a};
|
||||
border-top-right-radius: {border_radius_a};
|
||||
border-top-left-radius: {border_radius_small};
|
||||
border-top-right-radius: {border_radius_small};
|
||||
margin-right: 2px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTabBar::tab:selected {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
QTabBar::tab:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -578,15 +616,15 @@ HINT_BAR_STYLE = f"""
|
||||
|
||||
SETTINGS_TITLE_STYLE = f"""
|
||||
QLabel {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
margin-top: 1px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
padding: 6px;
|
||||
height: 30px;
|
||||
background: {color_d};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface_elevated};
|
||||
border-radius: {border_radius_small};
|
||||
min-width: 320px;
|
||||
}}
|
||||
"""
|
||||
@@ -595,15 +633,15 @@ SETTINGS_TITLE_STYLE = f"""
|
||||
QGROUP_BOX_STYLE = f"""
|
||||
QGroupBox {{
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
color: {color_a};
|
||||
border: {border_b} {color_c};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_accent};
|
||||
border: {border_thin} {color_surface};
|
||||
border-radius: {border_radius_small};
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
padding-top: 5px;
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QGroupBox::title {{
|
||||
subcontrol-origin: margin;
|
||||
@@ -615,49 +653,49 @@ QGROUP_BOX_STYLE = f"""
|
||||
# ACTION BUTTONS STYLE (SAVE, APPLY, ETC.)
|
||||
ACTION_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 16px;
|
||||
min-height: 20px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# ACTION BUTTON ACTIVE STYLE (MANGOHUD, GAMESCOPE ETC.)
|
||||
ACTION_BUTTON_ACTIVE_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 5px 16px;
|
||||
min-height: 20px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,55 +3,55 @@ from .constants import *
|
||||
# GLOBAL STYLE FOR WINDOW (BACKGROUND), LABELS, BUTTONS
|
||||
MAIN_WINDOW_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QLabel {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} rgba(255, 255, 255, 0.01);
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_border_subtle};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 16px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# PROGRESS BAR STYLE
|
||||
PROGRESS_BAR_STYLE = f"""
|
||||
QProgressBar {{
|
||||
color: {color_f};
|
||||
background-color: {color_c};
|
||||
color: {color_text};
|
||||
background-color: {color_surface};
|
||||
text-align: center;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QProgressBar::chunk {{
|
||||
background-color: {color_a};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# STATUS BAR STYLE
|
||||
STATUS_BAR_STYLE = f"""
|
||||
QStatusBar {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -65,10 +65,10 @@ HINT_BAR_STYLE = f"""
|
||||
# HINT LABEL STYLE
|
||||
HINTS_LABEL_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
font-family: '{font_family}';
|
||||
font-size: 13px;
|
||||
color: {color_f};
|
||||
font-size: {font_size_value};
|
||||
color: {color_text};
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.75px;
|
||||
}}
|
||||
@@ -77,11 +77,11 @@ HINTS_LABEL_STYLE = f"""
|
||||
# MAIN WINDOW HEADER STYLE
|
||||
MAIN_WINDOW_HEADER_STYLE = f"""
|
||||
QFrame {{
|
||||
background: {color_h};
|
||||
border: 10px solid {color_g};
|
||||
border-bottom: 0px solid {color_g};
|
||||
border-top-left-radius: 30px;
|
||||
border-top-right-radius: 30px;
|
||||
background: {color_transparent};
|
||||
border: 10px solid transparent;
|
||||
border-bottom: 0px solid transparent;
|
||||
border-top-left-radius: {border_radius_header};
|
||||
border-top-right-radius: {border_radius_header};
|
||||
border: none;
|
||||
}}
|
||||
"""
|
||||
@@ -89,257 +89,257 @@ MAIN_WINDOW_HEADER_STYLE = f"""
|
||||
# NAVIGATION AREA STYLE (TAB BUTTONS)
|
||||
NAV_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_h};
|
||||
border: {border_a};
|
||||
background: {color_transparent};
|
||||
border: {border_none};
|
||||
}}
|
||||
"""
|
||||
|
||||
# NAVIGATION TAB BUTTON STYLE
|
||||
NAV_BUTTON_STYLE = f"""
|
||||
NavLabel {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
padding: 6px 3px;
|
||||
margin: 10px 0 10px 10px;
|
||||
color: #7f7f7f;
|
||||
color: {color_nav_inactive};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
text-transform: uppercase;
|
||||
border: {color_a};
|
||||
border: {color_accent};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
NavLabel[checked = true] {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
border-bottom: {border_b} {color_a};
|
||||
border-bottom: {border_thin} {color_accent};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
NavLabel:hover {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
border-bottom: {border_b} #7f7f7f;
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
border-bottom: {border_thin} {color_nav_inactive};
|
||||
}}
|
||||
NavLabel[checked = true]:hover {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
border-bottom: {border_b} {color_a};
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
border-bottom: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# SEARCH FIELD STYLE
|
||||
SEARCH_EDIT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background-color: rgba(30, 30, 30, 0.50);
|
||||
border: {border_b} rgba(255, 255, 255, 0.5);
|
||||
border-radius: {border_radius_a};
|
||||
background-color: {color_detail_overlay};
|
||||
border: {border_thin} {color_border_input};
|
||||
border-radius: {border_radius_small};
|
||||
padding: 7px 14px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_normal};
|
||||
color: {color_text};
|
||||
min-height: 24px;
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
# SLIDER_SIZE_STYLE
|
||||
SLIDER_SIZE_STYLE= f"""
|
||||
SLIDER_SIZE_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
height: 25px;
|
||||
}}
|
||||
QSlider::groove:horizontal {{
|
||||
border: {border_a};
|
||||
border-radius: 3px;
|
||||
height: 6px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
|
||||
background: rgba(20, 20, 20, 0.30);
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_slider};
|
||||
height: 6px;
|
||||
background: {color_slider_groove_bg};
|
||||
margin: 6px 0;
|
||||
}}
|
||||
QSlider::handle:horizontal {{
|
||||
background: #bebebe;
|
||||
border: {border_a};
|
||||
background: {color_slider_handle};
|
||||
border: {border_none};
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin: -6px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
|
||||
border-radius: 9px;
|
||||
margin: -6px 0;
|
||||
border-radius: {border_radius_slider_handle};
|
||||
}}
|
||||
"""
|
||||
|
||||
# GAME CARD AREA STYLE (QWidget)
|
||||
LIST_WIDGET_STYLE = """
|
||||
QWidget {
|
||||
LIST_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
background: none;
|
||||
border: {border_a} {color_g};
|
||||
border: {border_none} transparent;
|
||||
border-radius: 25px;
|
||||
}
|
||||
}}
|
||||
"""
|
||||
|
||||
# ACTION BUTTONS STYLE (SAVE, APPLY, ETC.)
|
||||
ACTION_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 16px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# ACTION BUTTON ACTIVE STYLE (MANGOHUD, GAMESCOPE ETC.)
|
||||
ACTION_BUTTON_ACTIVE_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 16px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# DRIVES BUTTONS STYLE (FILE MANAGER)
|
||||
DRIVES_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
min-width: 90px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# OVERLAY STYLE
|
||||
OVERLAY_WINDOW_STYLE = f"background: {color_b};"
|
||||
OVERLAY_WINDOW_STYLE = f"background: {color_bg};"
|
||||
OVERLAY_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 16px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# TEXT STYLES: HEADINGS AND MAIN CONTENT
|
||||
TAB_TITLE_STYLE = f"font-family: '{font_family}'; font-size: {font_size_b}; color: {color_f}; background-color: none;"
|
||||
TAB_TITLE_STYLE = f"font-family: '{font_family}'; font-size: {font_size_header}; color: {color_text}; background-color: none;"
|
||||
CONTENT_STYLE = f"""
|
||||
QLabel {{
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_normal};
|
||||
color: {color_text};
|
||||
background-color: none;
|
||||
border-bottom: {border_b} rgba(255, 255, 255, 0.2);
|
||||
border-bottom: {border_thin} {color_border_light};
|
||||
padding-bottom: 15px;
|
||||
}}
|
||||
"""
|
||||
PREVIEW_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
margin-top: 3px;
|
||||
background-color: {color_c};
|
||||
border-radius: {border_radius_a};
|
||||
background-color: {color_surface};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
"""
|
||||
|
||||
# MAIN PAGES STYLE
|
||||
# LIBRARY_WIDGET_STYLE
|
||||
LIBRARY_WIDGET_STYLE= """
|
||||
QWidget {
|
||||
LIBRARY_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
|
||||
stop:0 rgba(112,20,132,1),
|
||||
stop:1 rgba(50,134,182,1));
|
||||
stop:0 {color_library_gradient_start},
|
||||
stop:1 {color_library_gradient_end});
|
||||
border-radius: 0px;
|
||||
}
|
||||
}}
|
||||
"""
|
||||
|
||||
# CONTAINER_STYLE
|
||||
CONTAINER_STYLE= """
|
||||
CONTAINER_STYLE = """
|
||||
QWidget {
|
||||
background-color: none;
|
||||
}
|
||||
"""
|
||||
|
||||
# OTHER_PAGES_WIDGET_STYLE
|
||||
OTHER_PAGES_WIDGET_STYLE= f"""
|
||||
OTHER_PAGES_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_d};
|
||||
background: {color_surface_elevated};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
"""
|
||||
|
||||
# CAROUSEL_WIDGET_STYLE
|
||||
CAROUSEL_WIDGET_STYLE= f"""
|
||||
CAROUSEL_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_c};
|
||||
background: {color_surface};
|
||||
border-radius: 0px;
|
||||
}}
|
||||
"""
|
||||
|
||||
THEME_TAB_FOCUS_STYLE = f"""
|
||||
QComboBox#themeTabCombo:focus {{
|
||||
border: {border_b} {color_f};
|
||||
background-color: {color_a};
|
||||
border: {border_thin} {color_text};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
QPushButton#themeApplyButton:focus {{
|
||||
border: {border_b} {color_f};
|
||||
border: {border_thin} {color_text};
|
||||
}}
|
||||
QGraphicsView#themeScreenshotsCarousel {{
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
QGraphicsView#themeScreenshotsCarousel:focus {{
|
||||
border: {border_b} {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -347,14 +347,14 @@ THEME_TAB_FOCUS_STYLE = f"""
|
||||
# PARAMS_TITLE_STYLE
|
||||
PARAMS_TITLE_STYLE = f"""
|
||||
QLabel {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
height: 34px;
|
||||
padding: 7px;
|
||||
background: {color_d};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface_elevated};
|
||||
border-radius: {border_radius_small};
|
||||
min-width: 150px;
|
||||
}}
|
||||
"""
|
||||
@@ -362,40 +362,40 @@ PARAMS_TITLE_STYLE = f"""
|
||||
# QMessageBox STYLES (MESSAGE BOXES)
|
||||
MESSAGE_BOX_STYLE = f"""
|
||||
QMessageBox {{
|
||||
background: {color_b};
|
||||
border: {border_a};
|
||||
background: {color_bg};
|
||||
border: {border_none};
|
||||
}}
|
||||
QMessageBox QLabel {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QMessageBox QPushButton {{
|
||||
background: {color_c};
|
||||
border: {border_a} {color_h};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
background: {color_surface};
|
||||
border: {border_none} {color_transparent};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 20px;
|
||||
min-width: 80px;
|
||||
}}
|
||||
QMessageBox QPushButton:hover {{
|
||||
background: {color_a};
|
||||
border-color: border: {border_b} {color_a};
|
||||
background: {color_accent};
|
||||
border-color: border: {border_thin} {color_accent};
|
||||
}}
|
||||
QMessageBox QPushButton:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# Favorite Star
|
||||
FAVORITE_LABEL_STYLE = f"color: gold; font-size: 32px; background: {color_h};"
|
||||
FAVORITE_LABEL_STYLE = f"color: {color_favorite_star}; font-size: 32px; background: {color_transparent};"
|
||||
|
||||
# Transparent background style
|
||||
TRANSPARENT_BACKGROUND_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -403,15 +403,15 @@ TRANSPARENT_BACKGROUND_STYLE = f"""
|
||||
QGROUP_BOX_STYLE = f"""
|
||||
QGroupBox {{
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
color: {color_a};
|
||||
border: {border_b} {color_c};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_accent};
|
||||
border: {border_thin} {color_surface};
|
||||
border-radius: {border_radius_small};
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
padding-top: 14px;
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QGroupBox::title {{
|
||||
subcontrol-origin: margin;
|
||||
@@ -423,20 +423,20 @@ QGROUP_BOX_STYLE = f"""
|
||||
# COMBOBOX
|
||||
COMBOBOX_STYLE = f"""
|
||||
QComboBox {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
padding-left: 12px;
|
||||
height: 34px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
min-width: 120px;
|
||||
combobox-popup: 0;
|
||||
}}
|
||||
QComboBox:on {{
|
||||
background: {color_b};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_bg};
|
||||
border: {border_medium} {color_accent};
|
||||
border-bottom-style: none;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
@@ -444,23 +444,23 @@ COMBOBOX_STYLE = f"""
|
||||
border-bottom-right-radius: 0px;
|
||||
}}
|
||||
QComboBox:hover {{
|
||||
border: {border_c} {color_a};
|
||||
background: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background: {color_accent};
|
||||
}}
|
||||
/* Focus state */
|
||||
QComboBox:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
QComboBox:disabled {{
|
||||
background: #2a2c35;
|
||||
border: {border_c} #2a2c35;
|
||||
color: #777a84;
|
||||
background: {color_combo_disabled_bg};
|
||||
border: {border_medium} {color_combo_disabled_border};
|
||||
color: {color_combo_disabled_text};
|
||||
}}
|
||||
QComboBox::drop-down {{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center right;
|
||||
border-left: {border_b} rgba(255, 255, 255, 0.05);
|
||||
border-left: {border_thin} {color_border_faint};
|
||||
padding: 12px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
@@ -480,8 +480,8 @@ COMBOBOX_STYLE = f"""
|
||||
/* List when combobox is open */
|
||||
QComboBox QAbstractItemView {{
|
||||
outline: none;
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
border-top-style: none;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
@@ -489,85 +489,85 @@ COMBOBOX_STYLE = f"""
|
||||
border-bottom-right-radius: 10px;
|
||||
}}
|
||||
QComboBox:editable {{
|
||||
background: {color_c};
|
||||
background: {color_surface};
|
||||
}}
|
||||
QComboBox::drop-down:editable:focus {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}}
|
||||
QListView {{
|
||||
background: {color_c};
|
||||
background: {color_surface};
|
||||
}}
|
||||
QListView::item {{
|
||||
padding: 7px 7px 7px 12px;
|
||||
margin: 3px;
|
||||
min-height: 24px;
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
}}
|
||||
QListView::item:hover {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QListView::item:selected {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
}}
|
||||
/* Selection in list when item is focused */
|
||||
QListView::item:focus {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
"""
|
||||
|
||||
SCROLL_STYLE = f"""
|
||||
QScrollBar:vertical {{
|
||||
width: 10px;
|
||||
border: {border_a};
|
||||
border-radius: 5px;
|
||||
background: rgba(20, 20, 20, 0.30);
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
background: {color_scrollbar_bg};
|
||||
}}
|
||||
QScrollBar::handle:vertical {{
|
||||
background: #bebebe;
|
||||
border: {border_a};
|
||||
border-radius: 5px;
|
||||
background: {color_scrollbar_handle};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
QScrollBar::add-line:vertical {{
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
background: none;
|
||||
}}
|
||||
QScrollBar::sub-line:vertical {{
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
background: none;
|
||||
}}
|
||||
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {{
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
background: none;
|
||||
}}
|
||||
QScrollBar:horizontal {{
|
||||
height: 10px;
|
||||
border: {border_a};
|
||||
border-radius: 5px;
|
||||
background: rgba(20, 20, 20, 0.30);
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
background: {color_scrollbar_bg};
|
||||
}}
|
||||
QScrollBar::handle:horizontal {{
|
||||
background: #bebebe;
|
||||
border: {border_a};
|
||||
border-radius: 5px;
|
||||
background: {color_scrollbar_handle};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
QScrollBar::add-line:horizontal {{
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
background: none;
|
||||
}}
|
||||
QScrollBar::sub-line:horizontal {{
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
background: none;
|
||||
}}
|
||||
QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal {{
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
background: none;
|
||||
@@ -577,133 +577,133 @@ SCROLL_STYLE = f"""
|
||||
SETTINGS_TABLE_COMBOBOX_STYLE = f"""
|
||||
QComboBox#settingsTableCombo:hover,
|
||||
QComboBox#settingsTableCombo:focus {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
CHECKBOX_STYLE = f"""
|
||||
QCheckBox {{
|
||||
height: 34px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QCheckBox::indicator {{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_c};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
background: {color_surface};
|
||||
}}
|
||||
QCheckBox::indicator:hover {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QCheckBox::indicator:focus {{
|
||||
border: {border_c} {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QCheckBox::indicator:checked {{
|
||||
image: url({theme_manager.get_icon("check", current_theme_name, as_path=True)});
|
||||
border: {border_c} {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QCheckBox::indicator:disabled {{
|
||||
background: {color_b};
|
||||
border: {border_c} {color_d};
|
||||
background: {color_bg};
|
||||
border: {border_medium} {color_surface_elevated};
|
||||
}}
|
||||
QCheckBox::indicator:checked:disabled {{
|
||||
image: url({theme_manager.get_icon("check", current_theme_name, as_path=True)});
|
||||
background: {color_b};
|
||||
border: {border_c} {color_d};
|
||||
background: {color_bg};
|
||||
border: {border_medium} {color_surface_elevated};
|
||||
}}
|
||||
|
||||
QTableWidget::indicator {{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: {border_c} {color_h};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_b};
|
||||
border: {border_medium} {color_transparent};
|
||||
border-radius: {border_radius_small};
|
||||
background: {color_bg};
|
||||
}}
|
||||
QTableWidget::indicator:unchecked {{
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
background: {color_checkbox_unchecked_bg};
|
||||
image: none;
|
||||
}}
|
||||
QTableWidget::indicator:checked {{
|
||||
background: {color_b};
|
||||
background: {color_bg};
|
||||
image: url({theme_manager.get_icon("check", current_theme_name, as_path=True)});
|
||||
border: {border_c} {color_a};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QTableWidget::indicator:hover {{
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: {border_c} {color_a};
|
||||
background: {color_checkbox_hover_bg};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QTableWidget::indicator:focus {{
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: {border_c} {color_a};
|
||||
background: {color_checkbox_hover_bg};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QTableWidget::indicator:disabled {{
|
||||
background: {color_b};
|
||||
border: {border_c} {color_d};
|
||||
background: {color_bg};
|
||||
border: {border_medium} {color_surface_elevated};
|
||||
}}
|
||||
QTableWidget::indicator:checked:disabled {{
|
||||
image: url({theme_manager.get_icon("check", current_theme_name, as_path=True)});
|
||||
background: {color_b};
|
||||
border: {border_c} {color_d};
|
||||
background: {color_bg};
|
||||
border: {border_medium} {color_surface_elevated};
|
||||
}}
|
||||
"""
|
||||
|
||||
LINE_EDIT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_c};
|
||||
border: {border_c} rgba(255, 255, 255, 0.01);
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_border_subtle};
|
||||
border-radius: {border_radius_small};
|
||||
height: 34px;
|
||||
padding-left: 12px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_e};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_surface_hover};
|
||||
}}
|
||||
"""
|
||||
|
||||
TOOLTIP_STYLE = f"""
|
||||
QLabel {{
|
||||
background: {color_b};
|
||||
border: {border_b} {color_e};
|
||||
background: {color_bg};
|
||||
border: {border_thin} {color_surface_hover};
|
||||
padding: 8px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
"""
|
||||
|
||||
TAB_STYLE = f"""
|
||||
QTabWidget::pane {{
|
||||
border-top: 1px solid {color_c};
|
||||
background: {color_h};
|
||||
border-top: 1px solid {color_surface};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QTabBar::tab {{
|
||||
background: {color_c};
|
||||
color: {color_f};
|
||||
background: {color_surface};
|
||||
color: {color_text};
|
||||
padding: 8px 16px;
|
||||
border-top-left-radius: {border_radius_a};
|
||||
border-top-right-radius: {border_radius_a};
|
||||
border-top-left-radius: {border_radius_small};
|
||||
border-top-right-radius: {border_radius_small};
|
||||
margin-right: 2px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTabBar::tab:selected {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
QTabBar::tab:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
"""
|
||||
@@ -4,7 +4,7 @@ from portprotonqt.config import ui_config
|
||||
theme_manager = ThemeManager()
|
||||
current_theme_name = ui_config.get_theme()
|
||||
|
||||
# CONSTANTS
|
||||
# === Layout Constants ===
|
||||
favoriteLabelSize = 48, 48
|
||||
favoriteLabelIconSize = 32
|
||||
detailCompactCoverFrameSize = 128
|
||||
@@ -23,47 +23,205 @@ mangoHudSwitchesVerticalSpacing = 10
|
||||
mangoHudFpsColumns = 4
|
||||
mangoHudFpsVerticalSpacing = 10
|
||||
mangoHudPresetsColumns = 2
|
||||
exeSettingsGroupBoxBlockSpacing= 14
|
||||
exeSettingsGroupBoxBlockSpacing = 14
|
||||
exeSettingsGroupBoxElementVerticalSpacing = 10
|
||||
exeSettingsGroupBoxElementHorizontalSpacing = 10
|
||||
|
||||
# VARS
|
||||
# === Typography ===
|
||||
font_family = "Play"
|
||||
font_size_a = "16px"
|
||||
font_size_b = "24px"
|
||||
border_a = "0px solid"
|
||||
border_b = "1px solid"
|
||||
border_c = "2px solid"
|
||||
border_radius_a = "10px"
|
||||
border_radius_b = "15px"
|
||||
color_a = "#409EFF"
|
||||
color_b = "#282a33"
|
||||
color_c = "#3f424d"
|
||||
color_d = "#32343d"
|
||||
color_e = "#404554"
|
||||
color_f = "#ffffff"
|
||||
color_g = "rgba(0, 0, 0, 0)"
|
||||
color_h = "transparent"
|
||||
color_i = "rgba(40, 42, 51, 0.9)"
|
||||
font_size_small = "11px"
|
||||
font_size_normal = "16px"
|
||||
font_size_value = "13px"
|
||||
font_size_keyboard = "14px"
|
||||
font_size_header = "24px"
|
||||
font_size_play = "18px"
|
||||
font_size_title = "32px"
|
||||
|
||||
# QColor constants for programmatic use
|
||||
color_shadow_card = "#00000096" # rgba(0, 0, 0, 150)
|
||||
color_shadow_detail = "#000000c8" # rgba(0, 0, 0, 200)
|
||||
# === Borders ===
|
||||
border_none = "0px solid"
|
||||
border_thin = "1px solid"
|
||||
border_medium = "2px solid"
|
||||
border_radius_small = "10px"
|
||||
border_radius_large = "15px"
|
||||
border_radius_card = "20px"
|
||||
border_radius_header = "30px"
|
||||
border_radius_badge = "5px"
|
||||
border_radius_slider = "3px"
|
||||
border_radius_slider_handle = "9px"
|
||||
|
||||
# === Core Palette ===
|
||||
color_accent = "#409EFF"
|
||||
color_bg = "#282a33"
|
||||
color_surface = "#3f424d"
|
||||
color_surface_elevated = "#32343d"
|
||||
color_surface_hover = "#404554"
|
||||
color_text = "#ffffff"
|
||||
color_transparent = "transparent"
|
||||
color_overlay = "rgba(40, 42, 51, 0.9)"
|
||||
|
||||
# === Secondary Palette ===
|
||||
color_shadow_card = "#00000096"
|
||||
color_shadow_detail = "#000000c8"
|
||||
color_placeholder_bg = "#333333"
|
||||
color_default_fallback = "#1a1a1a"
|
||||
color_disabled_bg = "#f0f0f0"
|
||||
color_disabled_text = "#777a84"
|
||||
color_text_muted = "#bbbbbb"
|
||||
color_accent_blue = "#007AFF"
|
||||
color_preloader = "#007AFF"
|
||||
color_gamepad_supported = "#00ff00"
|
||||
color_white = "#ffffff"
|
||||
missing_exe_cover_opacity = 0.45
|
||||
|
||||
# Shadow constants
|
||||
# === Widget State Colors ===
|
||||
color_combo_disabled_bg = "#2a2c35"
|
||||
color_combo_disabled_border = "#2a2c35"
|
||||
color_combo_disabled_text = "#777a84"
|
||||
|
||||
# === Navigation ===
|
||||
color_nav_inactive = "#7f7f7f"
|
||||
color_separator = "#7f7f7f"
|
||||
|
||||
# === Scrollbar ===
|
||||
color_scrollbar_bg = "rgba(20, 20, 20, 0.30)"
|
||||
color_scrollbar_handle = "#bebebe"
|
||||
|
||||
# === Slider ===
|
||||
color_slider_handle = "#bebebe"
|
||||
color_slider_groove_bg = "rgba(20, 20, 20, 0.30)"
|
||||
|
||||
# === Border Variants ===
|
||||
color_border_subtle = "rgba(255, 255, 255, 0.01)"
|
||||
color_border_input = "rgba(255, 255, 255, 0.5)"
|
||||
color_border_light = "rgba(255, 255, 255, 0.2)"
|
||||
color_border_faint = "rgba(255, 255, 255, 0.05)"
|
||||
color_border_focus = "rgba(255, 255, 255, 0.3)"
|
||||
|
||||
# === Checkbox ===
|
||||
color_checkbox_unchecked_bg = "rgba(255, 255, 255, 0.1)"
|
||||
color_checkbox_hover_bg = "rgba(255, 255, 255, 0.2)"
|
||||
|
||||
# === Favorite ===
|
||||
color_favorite_star = "gold"
|
||||
|
||||
# === Badge: Steam ===
|
||||
color_badge_steam_bg = "rgba(0, 0, 0, 0.5)"
|
||||
color_badge_steam_text = "white"
|
||||
color_badge_default_bg = "rgba(0, 0, 0, 0.5)"
|
||||
color_badge_default_text = "white"
|
||||
|
||||
# === Badge: ProtonDB ===
|
||||
color_protondb_platinum_bg = "rgba(255,255,255,0.9)"
|
||||
color_protondb_platinum_text = "black"
|
||||
color_protondb_gold_bg = "rgba(253,185,49,0.7)"
|
||||
color_protondb_gold_text = "black"
|
||||
color_protondb_silver_bg = "rgba(169,169,169,0.8)"
|
||||
color_protondb_silver_text = "black"
|
||||
color_protondb_bronze_bg = "rgba(205,133,63,0.7)"
|
||||
color_protondb_bronze_text = "black"
|
||||
color_protondb_borked_bg = "rgba(255,0,0,0.7)"
|
||||
color_protondb_borked_text = "black"
|
||||
color_protondb_pending_bg = "rgba(160,82,45,0.7)"
|
||||
color_protondb_pending_text = "black"
|
||||
|
||||
# === Badge: PPDB ===
|
||||
color_ppdb_platinum = "#b2b2ff"
|
||||
color_ppdb_gold = "#ffc107"
|
||||
color_ppdb_silver = "#e0e0e0"
|
||||
color_ppdb_bronze = "#cd7f32"
|
||||
color_ppdb_broken = "#f44336"
|
||||
|
||||
# === Badge: Anticheat ===
|
||||
color_anticheat_supported_bg = "rgba(102, 168, 15, 0.7)"
|
||||
color_anticheat_supported_text = "black"
|
||||
color_anticheat_running_bg = "rgba(25, 113, 194, 0.7)"
|
||||
color_anticheat_running_text = "black"
|
||||
color_anticheat_planned_bg = "rgba(156, 54, 181, 0.7)"
|
||||
color_anticheat_planned_text = "black"
|
||||
color_anticheat_broken_bg = "rgba(232, 89, 12, 0.7)"
|
||||
color_anticheat_broken_text = "black"
|
||||
color_anticheat_denied_bg = "rgba(224, 49, 49, 0.7)"
|
||||
color_anticheat_denied_text = "black"
|
||||
|
||||
# === Detail Page ===
|
||||
color_detail_overlay = "rgba(20, 20, 20, 0.40)"
|
||||
color_cover_frame_bg = "rgba(30, 30, 30, 0.80)"
|
||||
color_no_cover_bg = "rgba(20,20,20,0.95)"
|
||||
color_detail_line = "rgba(255,255,255,0.12)"
|
||||
|
||||
# === Library Gradient ===
|
||||
color_library_gradient_start = "rgba(112,20,132,1)"
|
||||
color_library_gradient_end = "rgba(50,134,182,1)"
|
||||
|
||||
# === Source Corner (Ribbon) ===
|
||||
SOURCE_CORNER = {
|
||||
"ribbon_color": "#3f424d",
|
||||
"ribbon_fold_color": "#00000096",
|
||||
"size_ratio": 0.28,
|
||||
"min_size": 54,
|
||||
"min_widget_size": 4,
|
||||
"peel_start_ratio": 0.32,
|
||||
"peel_mid_ratio": 0.58,
|
||||
"peel_end_ratio": 0.82,
|
||||
"peel_shadow_width": 3,
|
||||
"fold_start_ratio": 0.60,
|
||||
"fold_end_ratio": 0.92,
|
||||
"icon_center_ratio": 0.84,
|
||||
"icon_size_ratio": 0.25,
|
||||
"min_icon_size": 8,
|
||||
"gradient_start": 0.0,
|
||||
"gradient_end": 1.0,
|
||||
"gradient_lighter": 145,
|
||||
"gradient_darker": 112,
|
||||
"fold_darker": 132,
|
||||
}
|
||||
|
||||
# === Compact Card ===
|
||||
COMPACT_CARD = {
|
||||
"width_threshold": 150,
|
||||
"height_ratio": 2.25,
|
||||
"title_lines": 3,
|
||||
"title_scale": 0.75,
|
||||
}
|
||||
|
||||
# === Detail Compact ===
|
||||
DETAIL_COMPACT = {
|
||||
"cover_size": 128,
|
||||
"width": 1280,
|
||||
"cover_image_size": 108,
|
||||
"content_spacing": 15,
|
||||
"header_spacing": 16,
|
||||
"title_margins": (0, 0, 0, 0),
|
||||
"description_margins": (3, 3, 3, 3),
|
||||
}
|
||||
|
||||
# === Badge Layout ===
|
||||
BADGE = {
|
||||
"width": 200,
|
||||
"icon_size": 16,
|
||||
"compact_width": 30,
|
||||
"right_margin": 8,
|
||||
"spacing": 5,
|
||||
"top_y": 10,
|
||||
}
|
||||
|
||||
# === Cover ===
|
||||
COVER = {
|
||||
"width": 300,
|
||||
"height": 450,
|
||||
}
|
||||
|
||||
# === Preview Buttons ===
|
||||
color_preview_btn_bg = "rgba(0, 0, 0, 0.5)"
|
||||
color_preview_btn_text = "white"
|
||||
|
||||
# === Shadow ===
|
||||
shadow_blur_radius = 20
|
||||
shadow_offset = (0, 0)
|
||||
settings_tooltip_offset_x = 28
|
||||
settings_tooltip_offset_y = 4
|
||||
|
||||
# === Animation ===
|
||||
virtual_keyboard_slide_animation_duration = 160
|
||||
virtual_keyboard_fade_animation_duration = 140
|
||||
virtual_keyboard_slide_fade_animation_duration = 180
|
||||
@@ -71,180 +229,45 @@ virtual_keyboard_slide_bounce_animation_duration = 220
|
||||
virtual_keyboard_animation_type = "slide"
|
||||
DETAIL_PAGE_LAYOUT_MODE = "full"
|
||||
|
||||
# PPDB Badge colors
|
||||
color_ppdb_platinum = "#b2b2ff"
|
||||
color_ppdb_gold = "#ffc107"
|
||||
color_ppdb_silver = "#e0e0e0"
|
||||
color_ppdb_bronze = "#cd7f32"
|
||||
color_ppdb_broken = "#f44336"
|
||||
|
||||
GAME_CARD_ANIMATION = {
|
||||
# Animation type for entering/exiting detail page
|
||||
# Possible values: "fade", "slide_left", "slide_right", "slide_up", "slide_down", "bounce"
|
||||
# Defines how the detail page appears and disappears
|
||||
"detail_page_animation_type": "fade",
|
||||
|
||||
# Border width of card in idle state (no hover or focus)
|
||||
# Affects border thickness around card when not highlighted
|
||||
# Value in pixels
|
||||
"default_border_width": 2,
|
||||
|
||||
# Border width on hover
|
||||
# Increases border thickness when cursor is over card
|
||||
# Value in pixels
|
||||
"hover_border_width": 8,
|
||||
|
||||
# Border width on focus (e.g., keyboard selection)
|
||||
# Increases border thickness when card is focused
|
||||
# Value in pixels
|
||||
"focus_border_width": 12,
|
||||
|
||||
# Minimum border width during pulse animation
|
||||
# Defines minimum border thickness during pulse (breathing) animation
|
||||
# Value in pixels
|
||||
"pulse_min_border_width": 8,
|
||||
|
||||
# Maximum border width during pulse animation
|
||||
# Defines maximum border thickness during pulse
|
||||
# Value in pixels
|
||||
"pulse_max_border_width": 10,
|
||||
|
||||
# Duration of border thickness change animation (e.g., on hover or focus)
|
||||
# Affects speed of transition between border widths
|
||||
# Value in milliseconds
|
||||
"thickness_anim_duration": 300,
|
||||
|
||||
# Duration of one pulse animation cycle
|
||||
# Defines how fast border "pulses" between min and max values
|
||||
# Value in milliseconds
|
||||
"pulse_anim_duration": 800,
|
||||
|
||||
# Duration of gradient rotation animation
|
||||
# Affects speed of gradient border rotation around card
|
||||
# Value in milliseconds
|
||||
"gradient_anim_duration": 3000,
|
||||
|
||||
# Starting gradient angle (in degrees)
|
||||
# Defines starting point of gradient rotation
|
||||
"gradient_start_angle": 360,
|
||||
|
||||
# Ending gradient angle (in degrees)
|
||||
# Defines ending point of gradient rotation
|
||||
# Value 0 means full 360 degree rotation
|
||||
"gradient_end_angle": 0,
|
||||
|
||||
# Animation type for card on hover or focus
|
||||
# Possible values: "gradient", "scale", "fill", "stripe", "glow", "scale_fill"
|
||||
# "gradient" enables rotating gradient border, "scale" increases card size, "fill" applies accent overlay,
|
||||
# "stripe" applies static accent border, "glow" applies pulsing accent border,
|
||||
# "scale_fill" combines scale animation with fill overlay
|
||||
"card_animation_type": "gradient",
|
||||
|
||||
# Overlay color for "fill" card animation type
|
||||
# Any valid Qt color string (hex/rgb/rgba)
|
||||
"fill_color": color_a,
|
||||
|
||||
# Overlay opacity for "fill" card animation type (0-255)
|
||||
"fill_color": color_accent,
|
||||
"fill_alpha": 90,
|
||||
|
||||
# Border color for "stripe" card animation type
|
||||
# Any valid Qt color string (hex/rgb/rgba)
|
||||
"stripe_color": color_a,
|
||||
|
||||
# Border opacity for "stripe" card animation type (0-255)
|
||||
"stripe_color": color_accent,
|
||||
"stripe_alpha": 255,
|
||||
|
||||
# Base opacity for "glow" card animation type (0-255)
|
||||
"glow_base_alpha": 120,
|
||||
|
||||
# Additional pulse opacity for "glow" card animation type (0-255)
|
||||
"glow_pulse_alpha": 80,
|
||||
|
||||
# Card scale in idle state
|
||||
# Defines base card size (1.0 = 100% of original size)
|
||||
# Value as fraction (e.g., 1.0 for normal size)
|
||||
"default_scale": 1.0,
|
||||
|
||||
# Card scale on hover
|
||||
# Increases card size on hover
|
||||
# Value as fraction (e.g., 1.1 = 110% of original size)
|
||||
"hover_scale": 1.1,
|
||||
|
||||
# Card scale on focus (e.g., keyboard selection)
|
||||
# Increases card size on focus
|
||||
# Value as fraction (e.g., 1.05 = 105% of original size)
|
||||
"focus_scale": 1.05,
|
||||
|
||||
# Duration of scale animation
|
||||
# Affects speed of card size change on hover or focus
|
||||
# Value in milliseconds
|
||||
"scale_anim_duration": 200,
|
||||
|
||||
# Easing curve type for border thickness increase animation (on hover/focus)
|
||||
# Affects animation "feel" (e.g., smooth acceleration or deceleration)
|
||||
# Possible values: strings matching QEasingCurve.Type (e.g., "OutBack", "InOutQuad")
|
||||
"thickness_easing_curve": "OutBack",
|
||||
|
||||
# Easing curve type for border thickness decrease animation (on hover/focus loss)
|
||||
# Affects "feel" of return to original border width
|
||||
"thickness_easing_curve_out": "InBack",
|
||||
|
||||
# Easing curve type for scale increase animation (on hover/focus)
|
||||
# Affects scale animation "feel" (e.g., with "bounce" effect)
|
||||
# Possible values: strings matching QEasingCurve.Type
|
||||
"scale_easing_curve": "OutBack",
|
||||
|
||||
# Easing curve type for scale decrease animation (on hover/focus loss)
|
||||
# Affects "feel" of return to original scale
|
||||
"scale_easing_curve_out": "InBack",
|
||||
|
||||
# Gradient colors for animated border
|
||||
# List of dicts, each specifying position (0.0–1.0) and hex color
|
||||
# Affects border appearance on hover or focus if card_animation_type="gradient"
|
||||
"gradient_colors": [
|
||||
{"position": 0, "color": "#00fff5"}, # Start color (cyan)
|
||||
{"position": 0.33, "color": "#FF5733"}, # Color at 33% (orange)
|
||||
{"position": 0.66, "color": "#9B59B6"}, # Color at 66% (purple)
|
||||
{"position": 1, "color": "#00fff5"} # End color (return to cyan)
|
||||
{"position": 0, "color": "#00fff5"},
|
||||
{"position": 0.33, "color": "#FF5733"},
|
||||
{"position": 0.66, "color": "#9B59B6"},
|
||||
{"position": 1, "color": "#00fff5"},
|
||||
],
|
||||
|
||||
# Fade animation duration on detail page enter
|
||||
# Affects page appearance speed for fade animation
|
||||
# Value in milliseconds
|
||||
"detail_page_fade_duration": 350,
|
||||
|
||||
# Slide animation duration on detail page enter
|
||||
# Affects page sliding speed for slide animation
|
||||
# Value in milliseconds
|
||||
"detail_page_slide_duration": 500,
|
||||
|
||||
# Bounce animation duration on detail page enter
|
||||
# Affects page "bounce" speed for bounce animation
|
||||
# Value in milliseconds
|
||||
"detail_page_bounce_duration": 400,
|
||||
|
||||
# Fade animation duration on detail page exit
|
||||
# Affects page disappearance speed for fade animation
|
||||
# Value in milliseconds
|
||||
"detail_page_fade_duration_exit": 350,
|
||||
|
||||
# Slide animation duration on detail page exit
|
||||
# Affects page sliding speed for slide animation
|
||||
# Value in milliseconds
|
||||
"detail_page_slide_duration_exit": 500,
|
||||
|
||||
# Bounce animation duration on detail page exit
|
||||
# Affects page "squeeze" speed for bounce animation
|
||||
# Value in milliseconds
|
||||
"detail_page_bounce_duration_exit": 400,
|
||||
|
||||
# Easing curve type for detail page enter animation
|
||||
# Applied to slide and bounce animations, affects movement "feel"
|
||||
# Possible values: strings matching QEasingCurve.Type
|
||||
"detail_page_easing_curve": "OutCubic",
|
||||
|
||||
# Easing curve type for detail page exit animation
|
||||
# Applied to slide and bounce animations, affects movement "feel"
|
||||
# Possible values: strings matching QEasingCurve.Type
|
||||
"detail_page_easing_curve_exit": "InCubic"
|
||||
"detail_page_easing_curve_exit": "InCubic",
|
||||
}
|
||||
@@ -1,38 +1,38 @@
|
||||
from .constants import *
|
||||
|
||||
# BACKGROUND FOR DETAIL PAGE IF COVER NOT LOADED
|
||||
DETAIL_PAGE_NO_COVER_STYLE = f"background: rgba(20,20,20,0.95); border-radius: {border_radius_b};"
|
||||
DETAIL_PAGE_NO_COVER_STYLE = f"background: {color_no_cover_bg}; border-radius: {border_radius_large};"
|
||||
|
||||
# STYLE FOR "ADD GAME" AND "BACK" BUTTONS ON DETAIL PAGE AND LIBRARY
|
||||
ADDGAME_BACK_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: rgba(20, 20, 20, 0.40);
|
||||
border: {border_b} rgba(255, 255, 255, 0.5);
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_detail_overlay};
|
||||
border: {border_thin} {color_border_input};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 16px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
background: {color_a};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_accent};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
LIBRARY_CONTROLS_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: rgba(20, 20, 20, 0.40);
|
||||
border: {border_b} rgba(255, 255, 255, 0.5);
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
font-size: {font_size_a};
|
||||
background: {color_detail_overlay};
|
||||
border: {border_thin} {color_border_input};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-size: {font_size_normal};
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 12px;
|
||||
min-width: 24px;
|
||||
@@ -41,32 +41,32 @@ LIBRARY_CONTROLS_BUTTON_STYLE = f"""
|
||||
QPushButton:pressed,
|
||||
QPushButton:focus,
|
||||
QPushButton:checked {{
|
||||
background: rgba(20, 20, 20, 0.40);
|
||||
border: {border_b} {color_a};
|
||||
background: {color_detail_overlay};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
QComboBox {{
|
||||
background: rgba(20, 20, 20, 0.40);
|
||||
border: {border_b} rgba(255, 255, 255, 0.5);
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_detail_overlay};
|
||||
border: {border_thin} {color_border_input};
|
||||
border-radius: {border_radius_small};
|
||||
padding-left: 12px;
|
||||
height: 34px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
min-width: 120px;
|
||||
combobox-popup: 0;
|
||||
}}
|
||||
QComboBox:hover,
|
||||
QComboBox:focus {{
|
||||
background: rgba(20, 20, 20, 0.40);
|
||||
border: {border_b} {color_a};
|
||||
background: {color_detail_overlay};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
QComboBox:on {{
|
||||
background: {color_b};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_bg};
|
||||
border: {border_thin} {color_accent};
|
||||
border-bottom-style: none;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
@@ -76,7 +76,7 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
QComboBox::drop-down {{
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: center right;
|
||||
border-left: {border_b} rgba(255, 255, 255, 0.05);
|
||||
border-left: {border_thin} {color_border_faint};
|
||||
padding: 12px;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
@@ -95,8 +95,8 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
}}
|
||||
QComboBox QAbstractItemView {{
|
||||
outline: none;
|
||||
background: {color_c};
|
||||
border: {border_b} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_thin} {color_accent};
|
||||
border-top-style: none;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
@@ -107,84 +107,84 @@ LIBRARY_FILTER_COMBOBOX_STYLE = f"""
|
||||
padding: 7px 7px 7px 12px;
|
||||
margin: 3px;
|
||||
min-height: 24px;
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
}}
|
||||
QComboBox QAbstractItemView::item:hover,
|
||||
QComboBox QAbstractItemView::item:selected {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
"""
|
||||
|
||||
# MAIN FRAME FOR GAME DETAILS
|
||||
DETAIL_CONTENT_FRAME_STYLE = f"""
|
||||
QFrame {{
|
||||
background: {color_b};
|
||||
border: {border_a} {color_g};
|
||||
border-radius: {border_radius_b};
|
||||
background: {color_bg};
|
||||
border: {border_none} transparent;
|
||||
border-radius: {border_radius_large};
|
||||
}}
|
||||
"""
|
||||
|
||||
# FRAME UNDER COVER
|
||||
COVER_FRAME_STYLE = f"""
|
||||
QFrame {{
|
||||
background: rgba(30, 30, 30, 0.80);
|
||||
border-radius: {border_radius_b};
|
||||
border: {border_a} {color_g};
|
||||
background: {color_cover_frame_bg};
|
||||
border-radius: {border_radius_large};
|
||||
border: {border_none} transparent;
|
||||
}}
|
||||
"""
|
||||
|
||||
# COVER WIDGET
|
||||
COVER_WIDGET_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_h};
|
||||
border: {border_a} {color_h};
|
||||
background: {color_transparent};
|
||||
border: {border_none} {color_transparent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# COVER LABEL BORDER RADIUS
|
||||
COVER_LABEL_STYLE = f"border-radius: {border_radius_b};"
|
||||
COVER_LABEL_STYLE = f"border-radius: {border_radius_large};"
|
||||
|
||||
# DETAILS WIDGET (TEXT, DESCRIPTION)
|
||||
DETAILS_WIDGET_STYLE = f"""
|
||||
QFrame {{
|
||||
background: rgba(20,20,20,0.40);
|
||||
border-radius: {border_radius_b};
|
||||
background: {color_detail_overlay};
|
||||
border-radius: {border_radius_large};
|
||||
padding: 10px;
|
||||
}}
|
||||
QWidget#child {{
|
||||
background: rgba(20,20,20,0.40);
|
||||
border-radius: {border_radius_b};
|
||||
background: {color_detail_overlay};
|
||||
border-radius: {border_radius_large};
|
||||
padding: 10px;
|
||||
}}
|
||||
"""
|
||||
|
||||
|
||||
COMPACT_DETAILS_WIDGET_STYLE = f"background: rgba(20,20,20,0.40); border-radius: {border_radius_b}; padding: 10px;"
|
||||
COMPACT_DETAILS_WIDGET_STYLE = f"background: {color_detail_overlay}; border-radius: {border_radius_large}; padding: 10px;"
|
||||
|
||||
# TITLE (HEADER) ON DETAIL PAGE
|
||||
DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_a}; background: {color_h};"
|
||||
COMPACT_DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: 32px; color: {color_a}; background: {color_h};"
|
||||
DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: {font_size_title}; color: {color_accent}; background: {color_transparent};"
|
||||
COMPACT_DETAIL_PAGE_TITLE_STYLE = f"font-family: '{font_family}'; font-size: {font_size_title}; color: {color_accent}; background: {color_transparent};"
|
||||
|
||||
# DIVIDER LINE
|
||||
DETAIL_PAGE_LINE_STYLE = "color: rgba(255,255,255,0.12); margin: 0 0;"
|
||||
DETAIL_PAGE_LINE_STYLE = f"color: {color_detail_line}; margin: 0 0;"
|
||||
|
||||
# DESCRIPTION TEXT
|
||||
DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_a}; color: {color_f}; line-height: 1.5;"
|
||||
COMPACT_DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_a}; color: {color_f}; line-height: 1.5; background: {color_h};"
|
||||
DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_normal}; color: {color_text}; line-height: 1.5;"
|
||||
COMPACT_DETAIL_PAGE_DESC_STYLE = f"font-family: '{font_family}'; font-size: {font_size_normal}; color: {color_text}; line-height: 1.5; background: {color_transparent};"
|
||||
|
||||
# PLAYTIME WIDGET (PLAYTIME)
|
||||
COMPACT_PLAYTIME_WIDGET_STYLE = f"background: {color_h}; border-radius: {border_radius_b}; padding: 10px;"
|
||||
COMPACT_PLAYTIME_WIDGET_STYLE = f"background: {color_transparent}; border-radius: {border_radius_large}; padding: 10px;"
|
||||
|
||||
# PLAY BUTTON STYLE
|
||||
PLAY_BUTTON_STYLE = f"""
|
||||
QPushButton {{
|
||||
background: rgba(20, 20, 20, 0.40);
|
||||
border: {border_b} rgba(255, 255, 255, 0.5);
|
||||
border-radius: {border_radius_a};
|
||||
font-size: 18px;
|
||||
color: {color_f};
|
||||
background: {color_detail_overlay};
|
||||
border: {border_thin} {color_border_input};
|
||||
border-radius: {border_radius_small};
|
||||
font-size: {font_size_play};
|
||||
color: {color_text};
|
||||
font-weight: bold;
|
||||
font-family: '{font_family}';
|
||||
padding: 8px 16px;
|
||||
@@ -193,34 +193,34 @@ PLAY_BUTTON_STYLE = f"""
|
||||
min-height: 40px;
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
ADDGAME_INPUT_STYLE = f"""
|
||||
QLineEdit {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_g};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} transparent;
|
||||
border-radius: {border_radius_small};
|
||||
height: 34px;
|
||||
padding-left: 12px;
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QLineEdit:hover {{
|
||||
background: {color_c};
|
||||
border: {border_c} {color_a};
|
||||
background: {color_surface};
|
||||
border: {border_medium} {color_accent};
|
||||
}}
|
||||
QLineEdit:focus {{
|
||||
border: {border_c} {color_a};
|
||||
background-color: {color_e};
|
||||
border: {border_medium} {color_accent};
|
||||
background-color: {color_surface_hover};
|
||||
}}
|
||||
"""
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ from .constants import *
|
||||
|
||||
FILE_EXPLORER_STYLE = f"""
|
||||
QListView {{
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-family: {font_family};
|
||||
background: {color_c};
|
||||
alternate-background-color: {color_c};
|
||||
color: {color_f};
|
||||
background: {color_surface};
|
||||
alternate-background-color: {color_surface};
|
||||
color: {color_text};
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}}
|
||||
@@ -16,29 +16,29 @@ FILE_EXPLORER_STYLE = f"""
|
||||
}}
|
||||
QListView::item:alternate {{
|
||||
margin: 0px 5px;
|
||||
background: {color_d};
|
||||
background: {color_surface_elevated};
|
||||
}}
|
||||
QListView::item:selected {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
QListView::item:hover {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
QListView::item:focus {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
"""
|
||||
|
||||
FILE_EXPLORER_PATH_LABEL_STYLE = f"""
|
||||
QLabel {{
|
||||
color: {color_a};
|
||||
font-size: {font_size_a};
|
||||
color: {color_accent};
|
||||
font-size: {font_size_normal};
|
||||
font-family: {font_family};
|
||||
}}
|
||||
"""
|
||||
@@ -3,22 +3,22 @@ from .constants import *
|
||||
# GAME CARD STYLE (GAMECARD)
|
||||
GAME_CARD_WINDOW_STYLE = f"""
|
||||
QFrame {{
|
||||
border-radius: 20px;
|
||||
background: rgba(20, 20, 20, 0.40);
|
||||
border: {border_a} {color_g};
|
||||
border-radius: {border_radius_card};
|
||||
background: {color_detail_overlay};
|
||||
border: {border_none} transparent;
|
||||
}}
|
||||
"""
|
||||
|
||||
# GAME NAME LABEL IN CARD (QLabel)
|
||||
GAME_CARD_NAME_LABEL_STYLE = f"""
|
||||
QLabel {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
background-color: {color_g};
|
||||
border-bottom-left-radius: 20px;
|
||||
border-bottom-right-radius: 20px;
|
||||
background-color: {color_transparent};
|
||||
border-bottom-left-radius: {border_radius_card};
|
||||
border-bottom-right-radius: {border_radius_card};
|
||||
padding: 14px, 7px, 3px, 7px;
|
||||
qproperty-wordWrap: true;
|
||||
}}
|
||||
@@ -28,19 +28,19 @@ GAME_CARD_NAME_LABEL_STYLE = f"""
|
||||
def get_protondb_badge_style(tier):
|
||||
tier = tier.lower()
|
||||
tier_colors = {
|
||||
"platinum": {"background": "rgba(255,255,255,0.9)", "color": "black"},
|
||||
"gold": {"background": "rgba(253,185,49,0.7)", "color": "black"},
|
||||
"silver": {"background": "rgba(169,169,169,0.8)", "color": "black"},
|
||||
"bronze": {"background": "rgba(205,133,63,0.7)", "color": "black"},
|
||||
"borked": {"background": "rgba(255,0,0,0.7)", "color": "black"},
|
||||
"pending": {"background": "rgba(160,82,45,0.7)", "color": "black"}
|
||||
"platinum": {"background": color_protondb_platinum_bg, "color": color_protondb_platinum_text},
|
||||
"gold": {"background": color_protondb_gold_bg, "color": color_protondb_gold_text},
|
||||
"silver": {"background": color_protondb_silver_bg, "color": color_protondb_silver_text},
|
||||
"bronze": {"background": color_protondb_bronze_bg, "color": color_protondb_bronze_text},
|
||||
"borked": {"background": color_protondb_borked_bg, "color": color_protondb_borked_text},
|
||||
"pending": {"background": color_protondb_pending_bg, "color": color_protondb_pending_text},
|
||||
}
|
||||
colors = tier_colors.get(tier, {"background": "rgba(0, 0, 0, 0.5)", "color": "white"})
|
||||
colors = tier_colors.get(tier, {"background": color_badge_default_bg, "color": color_badge_default_text})
|
||||
return f"""
|
||||
qproperty-alignment: AlignCenter;
|
||||
background-color: {colors["background"]};
|
||||
color: {colors["color"]};
|
||||
border-radius: 5px;
|
||||
border-radius: {border_radius_badge};
|
||||
font-family: '{font_family}';
|
||||
font-weight: bold;
|
||||
"""
|
||||
@@ -53,14 +53,14 @@ def get_ppdb_badge_style(tier):
|
||||
"gold": {"background": color_ppdb_gold, "color": "black"},
|
||||
"silver": {"background": color_ppdb_silver, "color": "black"},
|
||||
"bronze": {"background": color_ppdb_bronze, "color": "black"},
|
||||
"broken": {"background": color_ppdb_broken, "color": "black"}
|
||||
"broken": {"background": color_ppdb_broken, "color": "black"},
|
||||
}
|
||||
colors = tier_colors.get(tier, {"background": "rgba(0, 0, 0, 0.5)", "color": "white"})
|
||||
colors = tier_colors.get(tier, {"background": color_badge_default_bg, "color": color_badge_default_text})
|
||||
return f"""
|
||||
qproperty-alignment: AlignCenter;
|
||||
background-color: {colors["background"]};
|
||||
color: {colors["color"]};
|
||||
border-radius: 5px;
|
||||
border-radius: {border_radius_badge};
|
||||
font-family: '{font_family}';
|
||||
font-weight: bold;
|
||||
"""
|
||||
@@ -69,44 +69,44 @@ def get_ppdb_badge_style(tier):
|
||||
def get_anticheat_badge_style(status):
|
||||
status = status.lower()
|
||||
status_colors = {
|
||||
"supported": {"background": "rgba(102, 168, 15, 0.7)", "color": "black"},
|
||||
"running": {"background": "rgba(25, 113, 194, 0.7)", "color": "black"},
|
||||
"planned": {"background": "rgba(156, 54, 181, 0.7)", "color": "black"},
|
||||
"broken": {"background": "rgba(232, 89, 12, 0.7)", "color": "black"},
|
||||
"denied": {"background": "rgba(224, 49, 49, 0.7)", "color": "black"}
|
||||
"supported": {"background": color_anticheat_supported_bg, "color": color_anticheat_supported_text},
|
||||
"running": {"background": color_anticheat_running_bg, "color": color_anticheat_running_text},
|
||||
"planned": {"background": color_anticheat_planned_bg, "color": color_anticheat_planned_text},
|
||||
"broken": {"background": color_anticheat_broken_bg, "color": color_anticheat_broken_text},
|
||||
"denied": {"background": color_anticheat_denied_bg, "color": color_anticheat_denied_text},
|
||||
}
|
||||
colors = status_colors.get(status, {"background": "rgba(0, 0, 0, 0.5)", "color": "white"})
|
||||
colors = status_colors.get(status, {"background": color_badge_default_bg, "color": color_badge_default_text})
|
||||
return f"""
|
||||
qproperty-alignment: AlignCenter;
|
||||
background-color: {colors["background"]};
|
||||
color: {colors["color"]};
|
||||
font-size: {font_size_a};
|
||||
border-radius: 5px;
|
||||
font-size: {font_size_normal};
|
||||
border-radius: {border_radius_badge};
|
||||
font-weight: bold;
|
||||
"""
|
||||
|
||||
# STEAM BADGE STYLES
|
||||
STEAM_BADGE_STYLE= f"""
|
||||
STEAM_BADGE_STYLE = f"""
|
||||
qproperty-alignment: AlignCenter;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
background: {color_badge_steam_bg};
|
||||
color: {color_badge_steam_text};
|
||||
border-radius: {border_radius_badge};
|
||||
font-family: '{font_family}';
|
||||
font-weight: bold;
|
||||
"""
|
||||
|
||||
|
||||
def get_source_corner_colors() -> dict:
|
||||
return {"color": "#3f424d", "fold_color": "#00000096"}
|
||||
|
||||
|
||||
# ADDITIONAL INFO STYLES ON GAMES PAGE
|
||||
LAST_LAUNCH_TITLE_STYLE = f"max-height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 11px; color: {color_f}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_VALUE_STYLE = f"height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 13px; color: {color_f}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_TITLE_STYLE = f"max-height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 11px; color: {color_f}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_VALUE_STYLE = f"height: 16px; background: rgba(20,20,20,0.40);font-family: '{font_family}'; font-size: 13px; color: {color_f}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_TITLE_STYLE = f"max-height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_small}; color: {color_text}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
LAST_LAUNCH_VALUE_STYLE = f"height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_value}; color: {color_text}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_TITLE_STYLE = f"max-height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_small}; color: {color_text}; text-transform: uppercase; letter-spacing: 0.75px;"
|
||||
PLAY_TIME_VALUE_STYLE = f"height: 16px; background: {color_detail_overlay};font-family: '{font_family}'; font-size: {font_size_value}; color: {color_text}; font-weight: 600; letter-spacing: 0.75px;"
|
||||
GAMEPAD_SUPPORT_VALUE_STYLE = f"""
|
||||
font-family: '{font_family}'; font-size: {font_size_a}; color: {color_gamepad_supported};
|
||||
font-weight: bold; background: {color_g};
|
||||
border-radius: 5px; padding: 4px 8px;
|
||||
font-family: '{font_family}'; font-size: {font_size_normal}; color: {color_gamepad_supported};
|
||||
font-weight: bold; background: {color_transparent};
|
||||
border-radius: {border_radius_badge}; padding: 4px 8px;
|
||||
"""
|
||||
|
||||
|
||||
def get_source_corner_config() -> dict:
|
||||
return SOURCE_CORNER
|
||||
@@ -3,56 +3,56 @@ from .constants import *
|
||||
GETWINE_WINDOW_STYLE = f"""
|
||||
/* Table */
|
||||
QHeaderView::section {{
|
||||
background: {color_d};
|
||||
color: {color_f};
|
||||
border: {border_a};
|
||||
background: {color_surface_elevated};
|
||||
color: {color_text};
|
||||
border: {border_none};
|
||||
font-weight: bold;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTableWidget {{
|
||||
background: {color_h};
|
||||
gridline-color: {color_h};
|
||||
color: {color_f};
|
||||
alternate-background-color: {color_d};
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_transparent};
|
||||
gridline-color: {color_transparent};
|
||||
color: {color_text};
|
||||
alternate-background-color: {color_surface_elevated};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTableWidget::item:!enabled {{
|
||||
color: #7a7a7a;
|
||||
color: {color_disabled_text};
|
||||
}}
|
||||
QTableWidget::item:selected,
|
||||
QTableWidget::item:selected:!active,
|
||||
QTableWidget::item:hover {{
|
||||
background: {color_a};
|
||||
background: {color_accent};
|
||||
}}
|
||||
/* LogArea */
|
||||
QFrame {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QTextEdit {{
|
||||
background: {color_c};
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
background: {color_surface};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
padding: 5px;
|
||||
}}
|
||||
QProgressBar {{
|
||||
color: {color_f};
|
||||
background-color: {color_c};
|
||||
color: {color_text};
|
||||
background-color: {color_surface};
|
||||
height: 34px;
|
||||
text-align: center;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QProgressBar::chunk {{
|
||||
background-color: {color_a};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
# Empty state label style
|
||||
GETWINE_EMPTY_LABEL_STYLE = f"font-size: {font_size_a}; padding: 50px;"
|
||||
GETWINE_EMPTY_LABEL_STYLE = f"font-size: {font_size_normal}; padding: 50px;"
|
||||
@@ -2,45 +2,45 @@ from .constants import *
|
||||
|
||||
SETTINGS_FRAME_STYLE = f"""
|
||||
QFrame {{
|
||||
background: {color_b};
|
||||
border: {border_a} {color_g};
|
||||
border-radius: {border_radius_b};
|
||||
background: {color_bg};
|
||||
border: {border_none} transparent;
|
||||
border-radius: {border_radius_large};
|
||||
}}
|
||||
"""
|
||||
|
||||
SETTINGS_FRAME_TITLE_STYLE = f"""
|
||||
QLabel {{
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
color: {color_a};
|
||||
color: {color_accent};
|
||||
}}
|
||||
"""
|
||||
|
||||
SETTINGS_TITLE_STYLE = f"""
|
||||
QLabel {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
height: 34px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
padding: 7px;
|
||||
background: {color_d};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_surface_elevated};
|
||||
border-radius: {border_radius_small};
|
||||
min-width: 320px;
|
||||
}}
|
||||
"""
|
||||
|
||||
SETTINGS_TITLE_CHECKBOX_STYLE = f"""
|
||||
QLabel {{
|
||||
color: {color_f};
|
||||
color: {color_text};
|
||||
height: 34px;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
font-weight: bold;
|
||||
padding: 7px;
|
||||
background: {color_h};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_transparent};
|
||||
border-radius: {border_radius_small};
|
||||
min-width: 180px;
|
||||
}}
|
||||
"""
|
||||
|
||||
@@ -2,88 +2,88 @@ from .constants import *
|
||||
|
||||
CONTEXT_MENU_STYLE = f"""
|
||||
QMenu {{
|
||||
background: {color_b};
|
||||
color: {color_f};
|
||||
background: {color_bg};
|
||||
color: {color_text};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
padding: 5px;
|
||||
min-width: 150px;
|
||||
border: {border_b} {color_a};
|
||||
border-radius: {border_radius_a};
|
||||
border: {border_thin} {color_accent};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
QMenu::icon {{
|
||||
margin-left: 15px;
|
||||
}}
|
||||
QMenu::item {{
|
||||
padding: 10px 20px 10px 10px;
|
||||
background: {color_h};
|
||||
border-radius: {border_radius_a};
|
||||
color: {color_f};
|
||||
background: {color_transparent};
|
||||
border-radius: {border_radius_small};
|
||||
color: {color_text};
|
||||
}}
|
||||
QMenu::item:selected {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
QMenu::item:disabled {{
|
||||
color: #7f7f7f;
|
||||
color: {color_separator};
|
||||
}}
|
||||
QMenu::item:hover {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
QMenu::item:focus {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
border: {border_b} rgba(255, 255, 255, 0.3);
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
border: {border_thin} {color_border_focus};
|
||||
border-radius: {border_radius_small};
|
||||
}}
|
||||
QMenu::separator {{
|
||||
height: 1px;
|
||||
background-color: #7f7f7f;
|
||||
background-color: {color_separator};
|
||||
margin: 3px 6px;
|
||||
}}
|
||||
"""
|
||||
|
||||
VIRTUAL_KEYBOARD_STYLE = f"""
|
||||
QWidget {{
|
||||
background: {color_i};
|
||||
background: {color_overlay};
|
||||
}}
|
||||
QPushButton {{
|
||||
font-size: 14px;
|
||||
border: {border_a} {color_h};
|
||||
border-radius: {border_radius_a};
|
||||
font-size: {font_size_keyboard};
|
||||
border: {border_none} {color_transparent};
|
||||
border-radius: {border_radius_small};
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
padding: 5px;
|
||||
background-color: {color_c};
|
||||
color: {color_f};
|
||||
background-color: {color_surface};
|
||||
color: {color_text};
|
||||
}}
|
||||
QPushButton:hover {{
|
||||
background-color: {color_a};
|
||||
border: {border_b} {color_a};
|
||||
background-color: {color_accent};
|
||||
border: {border_thin} {color_accent};
|
||||
}}
|
||||
QPushButton:focus {{
|
||||
border: {border_b} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
QPushButton[vk_selected="true"] {{
|
||||
border: {border_b} {color_a};
|
||||
background-color: {color_a};
|
||||
border: {border_thin} {color_accent};
|
||||
background-color: {color_accent};
|
||||
}}
|
||||
QPushButton:pressed {{
|
||||
background-color: {color_c};
|
||||
border: {border_a} {color_h};
|
||||
background-color: {color_surface};
|
||||
border: {border_none} {color_transparent};
|
||||
}}
|
||||
QPushButton[checked="true"] {{
|
||||
background-color: {color_a};
|
||||
color: {color_f};
|
||||
border: {border_a} {color_h};
|
||||
background-color: {color_accent};
|
||||
color: {color_text};
|
||||
border: {border_none} {color_transparent};
|
||||
}}
|
||||
QPushButton[checked="true"]:focus {{
|
||||
border: {border_b} {color_f};
|
||||
border: {border_thin} {color_text};
|
||||
}}
|
||||
"""
|
||||
|
||||
# FULLSCREEN THEME SCREENSHOT PREVIEW STYLES
|
||||
PREV_BUTTON_STYLE="background-color: rgba(0, 0, 0, 0.5); color: white; border: none;"
|
||||
NEXT_BUTTON_STYLE="background-color: rgba(0, 0, 0, 0.5); color: white; border: none;"
|
||||
PREV_BUTTON_STYLE = f"background-color: {color_preview_btn_bg}; color: {color_preview_btn_text}; border: none;"
|
||||
NEXT_BUTTON_STYLE = f"background-color: {color_preview_btn_bg}; color: {color_preview_btn_text}; border: none;"
|
||||
@@ -2,41 +2,41 @@ from .constants import *
|
||||
|
||||
WINETRICKS_TABBLE_STYLE = f"""
|
||||
QTableWidget {{
|
||||
background: {color_h};
|
||||
color: {color_f};
|
||||
gridline-color: {color_h};
|
||||
alternate-background-color: {color_d};
|
||||
border: {border_a};
|
||||
border-radius: {border_radius_a};
|
||||
background: {color_transparent};
|
||||
color: {color_text};
|
||||
gridline-color: {color_transparent};
|
||||
alternate-background-color: {color_surface_elevated};
|
||||
border: {border_none};
|
||||
border-radius: {border_radius_small};
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QHeaderView::section {{
|
||||
background: {color_d};
|
||||
color: {color_f};
|
||||
background: {color_surface_elevated};
|
||||
color: {color_text};
|
||||
padding: 5px;
|
||||
border: {border_a};
|
||||
border: {border_none};
|
||||
font-weight: bold;
|
||||
font-family: '{font_family}';
|
||||
font-size: {font_size_a};
|
||||
font-size: {font_size_normal};
|
||||
}}
|
||||
QTableWidget::item {{
|
||||
padding: 8px;
|
||||
border-bottom: {border_a } {color_c};
|
||||
border-bottom: {border_none} {color_surface};
|
||||
height: 36px;
|
||||
}}
|
||||
QTableWidget::item:selected,
|
||||
QTableWidget::item:focus,
|
||||
QTableWidget::item:selected:focus {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
selection-background-color: {color_a};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
selection-background-color: {color_accent};
|
||||
}}
|
||||
QTableWidget::item:hover {{
|
||||
background: {color_h};
|
||||
background: {color_transparent};
|
||||
}}
|
||||
QTableWidget::item:selected:hover {{
|
||||
background: {color_a};
|
||||
color: {color_f};
|
||||
background: {color_accent};
|
||||
color: {color_text};
|
||||
}}
|
||||
"""
|
||||
Reference in new issue
Block a user