Modernes Design: neue Symbole und Programm-Icon, ohne „95“ im Namen, Tipp des Tages ohne Büroklammer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
851fd6600a
commit
8c86571034
35 files changed
+149
-43
No files matched your search
+10
-1
@@ -7,6 +7,7 @@ from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import tkinter as tk
|
||||
from pathlib import Path
|
||||
from tkinter import ttk
|
||||
|
||||
FACE = "#c0c0c0"
|
||||
@@ -22,6 +23,7 @@ SEL_BG, SEL_FG = NAVY, WHITE # Auswahl/Markierung
|
||||
RAND = SHADOW # dünne Rahmenlinien (nur modern)
|
||||
DESIGN = "win95"
|
||||
MODERN = False
|
||||
APP_NAME = "Provisions-Manager 95" # modern: ohne „95“
|
||||
|
||||
_PALETTEN = {
|
||||
"win95": dict(FACE="#c0c0c0", HILITE="#ffffff", LIGHT="#dfdfdf", SHADOW="#808080", DARK="#000000",
|
||||
@@ -43,9 +45,10 @@ FONT_MONO = ("Courier New" if IS_WIN else "DejaVu Sans Mono", FONT_SIZE + 1)
|
||||
|
||||
def design_setzen(name: str) -> None:
|
||||
"""„modern“ oder „win95“ – setzt Farben und Schriften (Feinschliff der Schrift in apply())."""
|
||||
global DESIGN, MODERN, FONT_FAMILY, FONT_SIZE
|
||||
global DESIGN, MODERN, FONT_FAMILY, FONT_SIZE, APP_NAME
|
||||
DESIGN = name if name in _PALETTEN else "modern"
|
||||
MODERN = DESIGN == "modern"
|
||||
APP_NAME = "Provisions-Manager" if MODERN else "Provisions-Manager 95"
|
||||
globals().update(_PALETTEN[DESIGN])
|
||||
FONT_FAMILY = ("Segoe UI" if MODERN else "MS Sans Serif") if IS_WIN else "DejaVu Sans"
|
||||
FONT_SIZE = 9 if (MODERN or not IS_WIN) else 8
|
||||
@@ -295,7 +298,13 @@ def _icon_rows(name: str) -> list[str]:
|
||||
return [r.ljust(16, ".")[:16] for r in rows[:16]] + ["." * 16] * (16 - len(rows))
|
||||
|
||||
|
||||
MODERNE_ICONS = Path(__file__).resolve().parent / "bilder" / "modern"
|
||||
|
||||
|
||||
def make_icon(master, name: str, scale: int = 1) -> tk.PhotoImage:
|
||||
datei = MODERNE_ICONS / f"{name}{'_gross' if scale > 1 else ''}.png"
|
||||
if MODERN and datei.exists(): # glatte Symbole aus build/make_moderne_icons.py
|
||||
return tk.PhotoImage(master=master, file=str(datei))
|
||||
img = tk.PhotoImage(master=master, width=16 * scale, height=16 * scale)
|
||||
for y, row in enumerate(_icon_rows(name)):
|
||||
for x, ch in enumerate(row):
|
||||
|
||||
Reference in new issue
Block a user