This commit is contained in:
2026-04-21 10:00:36 +02:00
parent dcce7107ab
commit de8a7284d0
16 changed files with 1772 additions and 485 deletions

View File

@@ -34,7 +34,7 @@ from aza_style import (
_MODULE_DESCRIPTIONS = {
"ki": "Medizinische Fragen stellen,\nBefunde besprechen, Zweitmeinung einholen",
"kg": "Diktat aufnehmen, transkribieren\nund Krankengeschichte erstellen",
"kg": "Diktat aufnehmen und in Krankengeschichte umwandeln",
"empfang": "Empfangs-Chat, Aufgaben\nund Praxis-Kommunikation",
"notizen": "Sprachaufnahmen und Notizen\nfuer den Praxisalltag",
"translator": "Medizinische Fachtexte uebersetzen\nund Begriffe nachschlagen",
@@ -69,6 +69,7 @@ def _draw_module_icon(c: tk.Canvas, key: str):
fill=fg, outline="")
elif key == "kg":
# Nur Fallback wenn logo.png fehlt (Kachel nutzt sonst echtes Logo als PhotoImage)
c.create_text(m, m, text="AzA", font=("Segoe UI", 11, "bold"), fill=fg)
elif key == "notizen":
@@ -174,6 +175,7 @@ class AzaLauncher(tk.Tk):
self.attributes("-topmost", True)
self._logo_img = None
self._kg_tile_icon = None # gleiches logo.png wie Header, 38×38 für AzA-Office-Kachel
try:
import sys as _sys
_search = []
@@ -190,8 +192,17 @@ class AzaLauncher(tk.Tk):
break
if logo_path:
from PIL import Image, ImageTk
img = Image.open(logo_path).resize((44, 44), Image.Resampling.LANCZOS)
self._logo_img = ImageTk.PhotoImage(img, master=self)
_pil = Image.open(logo_path)
if _pil.mode not in ("RGB", "RGBA"):
_pil = _pil.convert("RGBA")
self._logo_img = ImageTk.PhotoImage(
_pil.resize((82, 82), Image.Resampling.LANCZOS),
master=self,
)
self._kg_tile_icon = ImageTk.PhotoImage(
_pil.resize((_ICON_SZ, _ICON_SZ), Image.Resampling.LANCZOS),
master=self,
)
except Exception:
pass
@@ -248,12 +259,12 @@ class AzaLauncher(tk.Tk):
title_block = tk.Frame(title_row, bg=BG)
title_block.pack(side="left", anchor="w")
aza_lbl = tk.Label(title_block, text="AzA",
font=(FONT_FAMILY, 24, "bold"), fg=ACCENT, bg=BG,
font=(FONT_FAMILY, 19, "bold"), fg="#1a4d6d", bg=BG,
cursor="hand2")
aza_lbl.pack(anchor="w")
aza_lbl.bind("<Double-Button-1>", self._open_admin)
tk.Label(title_block, text="Medizinischer KI-Arbeitsplatz",
font=(FONT_FAMILY, 10), fg=SUBTLE, bg=BG
tk.Label(title_block, text="von Arzt zu Arzt",
font=(FONT_FAMILY, 11), fg="#1a4d6d", bg=BG
).pack(anchor="w")
self._build_capacity_bar(header)
@@ -528,14 +539,15 @@ class AzaLauncher(tk.Tk):
top_row = tk.Frame(inner, bg=_cbg, cursor=_cursor)
top_row.pack(fill="x", pady=(0, 10))
if mod_key == "kg" and self._logo_img:
icon_lbl = tk.Label(top_row, image=self._logo_img, bg=_cbg, cursor=_cursor)
icon_lbl.image = self._logo_img
icon_lbl.pack(side="left")
icon_cv = tk.Canvas(top_row, width=_ICON_SZ, height=_ICON_SZ,
bg=icon_color, highlightthickness=0, cursor=_cursor)
icon_cv.pack(side="left")
if mod_key == "kg" and getattr(self, "_kg_tile_icon", None) is not None:
icon_cv.create_image(
_ICON_SZ // 2, _ICON_SZ // 2,
image=self._kg_tile_icon,
)
else:
icon_cv = tk.Canvas(top_row, width=_ICON_SZ, height=_ICON_SZ,
bg=icon_color, highlightthickness=0, cursor=_cursor)
icon_cv.pack(side="left")
_draw_module_icon(icon_cv, mod_key)
lbl_title = tk.Label(inner, text=label, font=(FONT_FAMILY, 12, "bold"),