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
-10
@@ -7,7 +7,6 @@ from collections import Counter, defaultdict
|
||||
from pathlib import Path
|
||||
from tkinter import filedialog, ttk
|
||||
|
||||
from provtool import APP_NAME
|
||||
from provtool.db import CAPS_ANBIETER, CAPS_WERT, Haendler, ist_grossgeschrieben
|
||||
from provtool.gui import win32
|
||||
from provtool.gui import win95 as w
|
||||
@@ -33,7 +32,7 @@ class Einrichtungsassistent(w.Dialog):
|
||||
BREITE, HOEHE = 470, 340
|
||||
|
||||
def __init__(self, app):
|
||||
super().__init__(app.root, "Provisions-Manager 95 – Einrichtung")
|
||||
super().__init__(app.root, f"{w.APP_NAME} – Einrichtung")
|
||||
self.app = app
|
||||
self.dateien: list[str] = []
|
||||
self.vorschlaege: dict[str, list[str]] = {"freenet": [], "vodafone": []}
|
||||
@@ -77,7 +76,7 @@ class Einrichtungsassistent(w.Dialog):
|
||||
for i, (x, y) in enumerate(((20, 30), (120, 55), (35, 120), (128, 150), (60, 20))):
|
||||
c.create_rectangle(x, y, x + 2 + i % 2, y + 2 + i % 2, fill=w.WHITE, outline="")
|
||||
c.create_image(77, self.HOEHE // 2 - 10, image=self._img)
|
||||
c.create_text(77, self.HOEHE - 38, text="Provisions-\nManager 95", fill=w.WHITE, font=w.FONT_BOLD,
|
||||
c.create_text(77, self.HOEHE - 38, text=w.APP_NAME.replace("-", "-\n", 1), fill=w.WHITE, font=w.FONT_BOLD,
|
||||
justify="center")
|
||||
|
||||
def _leeren(self):
|
||||
@@ -100,7 +99,7 @@ class Einrichtungsassistent(w.Dialog):
|
||||
self.b_zurueck.configure(state="normal" if nr > 0 else "disabled")
|
||||
self.b_weiter.configure(text="Fertig stellen" if nr == len(self.seiten) - 1 else "Weiter >")
|
||||
if self.titelleiste:
|
||||
self.titelleiste.set_titel(f"Provisions-Manager 95 – Einrichtung (Schritt {nr + 1} von {len(self.seiten)})")
|
||||
self.titelleiste.set_titel(f"{w.APP_NAME} – Einrichtung (Schritt {nr + 1} von {len(self.seiten)})")
|
||||
|
||||
def _weiter(self):
|
||||
pruefer = getattr(self, f"_pruefe_{self.nr}", None)
|
||||
@@ -128,7 +127,7 @@ class Einrichtungsassistent(w.Dialog):
|
||||
|
||||
# ---------------------------------------------------------------- Seite 1
|
||||
def _s_willkommen(self):
|
||||
self._ueberschrift(f"Willkommen beim {APP_NAME}!")
|
||||
self._ueberschrift(f"Willkommen beim {w.APP_NAME}!")
|
||||
self._text("Dieser Assistent richtet das Programm in wenigen Schritten ein:")
|
||||
for punkt in ("Speicherort der Daten festlegen",
|
||||
"Unterhändler mit ihren Kennungen anlegen",
|
||||
@@ -384,7 +383,7 @@ class Einrichtungsassistent(w.Dialog):
|
||||
def _s_fertig(self):
|
||||
self._ueberschrift("Fertig!")
|
||||
n = len(self.app.db.haendler_liste())
|
||||
self._text(f"Der {APP_NAME} ist eingerichtet.")
|
||||
self._text(f"Der {w.APP_NAME} ist eingerichtet.")
|
||||
self._text(f" - {n} Händler angelegt")
|
||||
if self.v_abrechnung.get():
|
||||
self._text(f" - Abrechnung „{self.v_titel.get().strip()}“"
|
||||
@@ -582,13 +581,14 @@ class TippDesTages(w.Dialog):
|
||||
haupt.pack(padx=12, pady=12)
|
||||
box = tk.Frame(haupt, bg=w.WHITE, bd=2, relief="sunken")
|
||||
box.pack(side="left", fill="both")
|
||||
self._bild = tipp_bild(self)
|
||||
self.bild_ok = self._bild is not None
|
||||
if self._bild is None: # Ersatz, falls das Bild fehlt
|
||||
# Büroklammer nur im Win95-Design; modern eine schlichte Glühbirne
|
||||
self._bild = None if w.MODERN else tipp_bild(self)
|
||||
self.bild_ok = self._bild is not None or w.MODERN
|
||||
if self._bild is None:
|
||||
self._bild = w.make_icon(self, "birne", 3)
|
||||
tk.Label(box, image=self._bild, bg=w.WHITE).pack(side="left", anchor="n", padx=(12, 4), pady=10)
|
||||
# fester Textbereich: der Tipp bricht darin um und kann nicht mehr abgeschnitten werden
|
||||
rechts = tk.Frame(box, bg=w.WHITE, padx=12, pady=10, width=380, height=self._bild.height() + 20)
|
||||
rechts = tk.Frame(box, bg=w.WHITE, padx=12, pady=10, width=380, height=max(self._bild.height(), 170) + 20)
|
||||
rechts.pack(side="left", fill="both")
|
||||
rechts.pack_propagate(False)
|
||||
tk.Label(rechts, text="Wussten Sie schon...", bg=w.WHITE, font=(w.FONT_FAMILY, w.FONT_SIZE + 6, "bold"),
|
||||
|
||||
Reference in new issue
Block a user