chore: do not use the special red tooltip, stay consistent

This commit is contained in:
2026-08-20 19:54:50 +02:00
parent 8b6ae51ce6
commit ef4bc011ab
3 changed files with 36 additions and 14 deletions
+1 -10
View File
@@ -559,22 +559,13 @@ TOOLTIP_FG = "#263043"
DARK_TOOLTIP_BG = "#0e1728" # dusk panel2 — deepest opaque (menus/tooltips)
DARK_TOOLTIP_FG = "#e9edf4" # dusk text
# "Needs admin/staff" warning tips: same passive QToolTip, on a Catppuccin
# red wash — a denial reads as a warning without a click-to-close dialog.
ADMIN_TIP_BG = "#d20f39" # latte red
ADMIN_TIP_FG = "#ffffff"
DARK_ADMIN_TIP_BG = "#f38ba8" # mocha red
DARK_ADMIN_TIP_FG = "#11111b" # mocha crust
def admin_tip_qss(theme: str) -> str:
"""QToolTip rule for admin-only warning tips. Set it on the widget the
tip is shown for, never app-wide — QToolTip inherits QSS from that
widget, and an app-wide rule would turn every tooltip red."""
bg, fg = (
(DARK_ADMIN_TIP_BG, DARK_ADMIN_TIP_FG)
if theme == THEME_SUNSET
else (ADMIN_TIP_BG, ADMIN_TIP_FG)
(DARK_TOOLTIP_BG, DARK_TOOLTIP_FG) if theme == THEME_SUNSET else (TOOLTIP_BG, TOOLTIP_FG)
)
# Transparent border required, same as the app-wide QToolTip rule.
return (