mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-08-25 23:15:18 +02:00
Make ReminderDialog resizable/wider and fix Options dialog bottom clipping
ReminderDialog: override the shared dialog base's resizable(False, False), widen the initial layout, and pin the items-table edit row's amount field to the exact same pixel width as the table's fixed "amount" column (via a pack_propagate(False) frame) while the description field stretches like the table's own column does -- keeps alignment exact even after resizing. OptionsDialog: compute the window's initial geometry from its actual required size after all tabs (incl. "Mahnungen") are built, instead of a static guess that clipped the Mahnungen tab's tables/buttons at the bottom. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
3940926a22
commit
f3bdffd347
@@ -61,13 +61,21 @@ class OptionsDialog(tk.Toplevel):
|
||||
)
|
||||
}
|
||||
self.title("Optionen")
|
||||
self.geometry("900x650")
|
||||
self.minsize(760, 540)
|
||||
self.transient(master.winfo_toplevel())
|
||||
self.grab_set()
|
||||
self.resizable(True, True)
|
||||
self._build_ui()
|
||||
self.bind("<Escape>", lambda _event: self.destroy())
|
||||
# A ttk.Notebook sizes itself to its tallest/widest tab, so once every tab
|
||||
# (including "Mahnungen" with its two tables) is built, the natural required
|
||||
# size reflects whichever one actually needs the most room -- open at that size
|
||||
# instead of a static guess that clips a table/buttons at the bottom. The floor
|
||||
# keeps the window from opening awkwardly small on short content.
|
||||
self.update_idletasks()
|
||||
width = max(900, self.winfo_reqwidth())
|
||||
height = max(650, self.winfo_reqheight())
|
||||
self.geometry(f"{width}x{height}")
|
||||
self.minsize(760, 540)
|
||||
self.after_idle(self._center_on_parent)
|
||||
|
||||
def _build_ui(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user