Popups gehen mittig ueber dem Programmfenster auf
Gleiche Aenderung wie im Rechnungstool, gleiche theme.py: theme.mittig() setzt jeden Dialog mittig ueber sein Elternfenster, theme.auf_bildschirm() begrenzt auf den gesamten Desktop ueber alle Monitore statt auf den Hauptmonitor. Sein Befund: "da gehen noch die popups auf dem video monitor auf". Ursache war ein `max(0, x)`, das jede negative Koordinate auf null klemmte - bei ihm steht der zweite Monitor links (x = -1920). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4t48uxDok5rJXhC9bX1Ax
This commit is contained in:
parent
f57c7f52f4
commit
755c844ee4
6 changed files with 104 additions and 12 deletions
|
|
@ -22,6 +22,7 @@ hinueber.
|
|||
"""
|
||||
|
||||
import os
|
||||
import theme
|
||||
import tkinter as tk
|
||||
from tkinter import ttk, filedialog, messagebox
|
||||
|
||||
|
|
@ -91,7 +92,8 @@ class OrdnerWahl(tk.Toplevel):
|
|||
hoehe = max(self.winfo_reqheight(), 300)
|
||||
x = master.winfo_rootx() + max(0, (master.winfo_width() - BREITE) // 2)
|
||||
y = master.winfo_rooty() + 90
|
||||
self.geometry(f"{BREITE}x{hoehe}+{max(0, x)}+{max(0, y)}")
|
||||
self.geometry(f"{BREITE}x{hoehe}")
|
||||
theme.mittig(self, master)
|
||||
self.minsize(BREITE, hoehe)
|
||||
self.grab_set()
|
||||
self.lift()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue