Empfang V4: Auth, Praxis-Tenant, Cockpit, Caddy-Rewrite
Made-with: Cursor
This commit is contained in:
@@ -12,6 +12,7 @@ import tkinter as tk
|
||||
from aza_config import (
|
||||
LAUNCHER_MODULES,
|
||||
LAUNCHER_MODULE_LABELS,
|
||||
LAUNCHER_DISABLED_MODULES,
|
||||
)
|
||||
from aza_persistence import (
|
||||
load_launcher_prefs,
|
||||
@@ -514,32 +515,41 @@ class AzaLauncher(tk.Tk):
|
||||
def _create_card(self, parent, mod_key: str, card_bg: str = None) -> tk.Frame:
|
||||
label = LAUNCHER_MODULE_LABELS.get(mod_key, mod_key)
|
||||
desc = _MODULE_DESCRIPTIONS.get(mod_key, "")
|
||||
icon_color = _MODULE_ICON_COLORS.get(mod_key, ACCENT)
|
||||
_cbg = card_bg or CARD_BG
|
||||
is_disabled = mod_key in LAUNCHER_DISABLED_MODULES
|
||||
icon_color = "#B0BEC5" if is_disabled else _MODULE_ICON_COLORS.get(mod_key, ACCENT)
|
||||
_cbg = "#ECEFF1" if is_disabled else (card_bg or CARD_BG)
|
||||
_cursor = "arrow" if is_disabled else "hand2"
|
||||
_text_fg = "#90A4AE" if is_disabled else TEXT
|
||||
_desc_fg = "#B0BEC5" if is_disabled else SUBTLE
|
||||
|
||||
card = tk.Frame(parent, bg=_cbg, cursor="hand2",
|
||||
card = tk.Frame(parent, bg=_cbg, cursor=_cursor,
|
||||
highlightthickness=1, highlightbackground=CARD_BORDER)
|
||||
|
||||
inner = tk.Frame(card, bg=_cbg, cursor="hand2")
|
||||
inner = tk.Frame(card, bg=_cbg, cursor=_cursor)
|
||||
inner.pack(fill="both", expand=True, padx=20, pady=18)
|
||||
|
||||
top_row = tk.Frame(inner, bg=_cbg, cursor="hand2")
|
||||
top_row = tk.Frame(inner, bg=_cbg, cursor=_cursor)
|
||||
top_row.pack(fill="x", pady=(0, 10))
|
||||
|
||||
icon_cv = tk.Canvas(top_row, width=_ICON_SZ, height=_ICON_SZ,
|
||||
bg=icon_color, highlightthickness=0, cursor="hand2")
|
||||
bg=icon_color, highlightthickness=0, cursor=_cursor)
|
||||
icon_cv.pack(side="left")
|
||||
_draw_module_icon(icon_cv, mod_key)
|
||||
|
||||
tk.Label(inner, text=label, font=(FONT_FAMILY, 12, "bold"),
|
||||
fg=TEXT, bg=_cbg, anchor="w", cursor="hand2"
|
||||
).pack(anchor="w")
|
||||
lbl_title = tk.Label(inner, text=label, font=(FONT_FAMILY, 12, "bold"),
|
||||
fg=_text_fg, bg=_cbg, anchor="w", cursor=_cursor)
|
||||
lbl_title.pack(anchor="w")
|
||||
|
||||
if desc:
|
||||
tk.Label(inner, text=desc, font=(FONT_FAMILY, 9),
|
||||
fg=SUBTLE, bg=_cbg, anchor="w",
|
||||
justify="left", cursor="hand2"
|
||||
).pack(anchor="w", pady=(4, 0))
|
||||
lbl_desc = tk.Label(inner, text=desc, font=(FONT_FAMILY, 9),
|
||||
fg=_desc_fg, bg=_cbg, anchor="w",
|
||||
justify="left", cursor=_cursor)
|
||||
lbl_desc.pack(anchor="w", pady=(4, 0))
|
||||
|
||||
if is_disabled:
|
||||
tk.Label(inner, text="Bald verf\u00fcgbar", font=(FONT_FAMILY, 8, "italic"),
|
||||
fg="#B0BEC5", bg=_cbg).pack(anchor="w", pady=(4, 0))
|
||||
return card
|
||||
|
||||
def on_enter(e):
|
||||
card.configure(highlightbackground=CARD_HOVER_BORDER, highlightthickness=2)
|
||||
|
||||
Reference in New Issue
Block a user