Stufe 2: Akte vollstaendig (4.0)
Mehrere Akten mit Liste, Formular und Dokumentansicht, Portraet, Statusstempel bei gefallen und vermisst, Vorschlagslisten fuer 22 Fraktionen samt Dienstgraden. Datenmodell in akte_modell.py ohne tkinter, Vorlagen in akte_vorlagen.py. Speichern atomar mit Sicherung, Loeschen ueber einen Papierkorb-Ordner. Neue Abhaengigkeit Pillow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
f49e9a3ed0
commit
8c0d364a8a
11 changed files with 1308 additions and 29 deletions
42
theme.py
42
theme.py
|
|
@ -6,10 +6,36 @@ Eigene Datei, damit mehrere Module (Funk, Akte) denselben Stil nutzen,
|
|||
ohne sich gegenseitig zu importieren.
|
||||
"""
|
||||
|
||||
import ctypes
|
||||
import ctypes.wintypes as wintypes
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
|
||||
|
||||
def dunkle_titelleiste(fenster):
|
||||
"""
|
||||
Dunkle Titelleiste fuer ein beliebiges Fenster, auch fuer Dialoge.
|
||||
|
||||
Windows zeichnet sie sonst hell. Attribut 20 gilt fuer aktuelle
|
||||
Windows-Versionen, 19 fuer aeltere. Danach muss das Fenster einmal neu
|
||||
gezeichnet werden, sonst bleibt die alte Farbe stehen.
|
||||
"""
|
||||
try:
|
||||
fenster.update_idletasks()
|
||||
hwnd = ctypes.windll.user32.GetParent(fenster.winfo_id()) or fenster.winfo_id()
|
||||
an = ctypes.c_int(1)
|
||||
for attribut in (20, 19):
|
||||
if ctypes.windll.dwmapi.DwmSetWindowAttribute(
|
||||
wintypes.HWND(hwnd), ctypes.c_uint(attribut),
|
||||
ctypes.byref(an), ctypes.sizeof(an)) == 0:
|
||||
fenster.withdraw()
|
||||
fenster.deiconify()
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
BG = "#151814" # Fensterhintergrund, fast schwarz mit Gruenstich
|
||||
PANEL = "#1e231b" # Flaechen, Eingabefelder
|
||||
PANEL_HI = "#2a3125" # Hover, ausgewaehlter Reiter
|
||||
|
|
@ -115,6 +141,22 @@ def apply_tactical_theme(root):
|
|||
background=[("active", BG)],
|
||||
lightcolor=[("active", OLIVE_HI)],
|
||||
darkcolor=[("active", OLIVE_HI)])
|
||||
# Tabellen und Scrollbalken (Modul Akte)
|
||||
style.configure("Treeview", background=PANEL, fieldbackground=PANEL,
|
||||
foreground=FG, bordercolor=LINE, lightcolor=PANEL,
|
||||
darkcolor=PANEL, rowheight=24, font=FONT_UI)
|
||||
style.map("Treeview",
|
||||
background=[("selected", OLIVE)],
|
||||
foreground=[("selected", "#12150f")])
|
||||
style.configure("Treeview.Heading", background=BG, foreground=FG_DIM,
|
||||
bordercolor=LINE, lightcolor=BG, darkcolor=BG,
|
||||
font=FONT_BOLD, relief="flat")
|
||||
style.map("Treeview.Heading", background=[("active", PANEL_HI)])
|
||||
style.configure("Vertical.TScrollbar", background=PANEL, troughcolor=BG,
|
||||
bordercolor=LINE, arrowcolor=FG_DIM, lightcolor=PANEL,
|
||||
darkcolor=PANEL)
|
||||
style.map("Vertical.TScrollbar", background=[("active", PANEL_HI)])
|
||||
|
||||
# Hauptreiter (FUNK, AKTE): ohne Kasten, nur Schrift - so heben sie sich
|
||||
# als uebergeordnete Ebene von den umrahmten Unterreitern ab.
|
||||
style.configure("Haupt.TNotebook", background=BG, bordercolor=BG,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue