mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-08-26 15:25:19 +02:00
Fix column order/widths and sizing in Hausmeister and GnuCash import
Hausmeister: reorder columns to Level, Fällig, Vorgang, Details. Level, Fällig and Vorgang get a fixed width; only Details stretches to fill the remaining space. GnuCash-Import dialog: opens at 80% of the current monitor's size (monitor-aware via the existing screeninfo-based helpers, not just the raw/virtual screen size) instead of a fixed 960x640. In its booking table, Import, Datum, Betrag and Status get a fixed width; Beschreibung and Memo share the remaining space. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
65bcc9f447
commit
e25accd35b
@@ -22,6 +22,7 @@ from ccma.services.gnucash_import import (
|
||||
list_transactions,
|
||||
)
|
||||
from ccma.storage.repository import MemberRepository, RepositoryError
|
||||
from ccma.ui.monitors import centered_geometry, preferred_monitor
|
||||
|
||||
|
||||
class GnuCashImportDialog(tk.Toplevel):
|
||||
@@ -55,7 +56,8 @@ class GnuCashImportDialog(tk.Toplevel):
|
||||
|
||||
self.title("Zahlungen aus GnuCash importieren")
|
||||
self.transient(master.winfo_toplevel())
|
||||
self.geometry("960x640")
|
||||
monitor = preferred_monitor(master.winfo_toplevel())
|
||||
self.geometry(centered_geometry(round(monitor.width * 0.8), round(monitor.height * 0.8), monitor))
|
||||
self.minsize(780, 480)
|
||||
self.protocol("WM_DELETE_WINDOW", self.destroy)
|
||||
self.bind("<Escape>", lambda _event: self.destroy())
|
||||
@@ -134,8 +136,8 @@ class GnuCashImportDialog(tk.Toplevel):
|
||||
("status", "Status", 220),
|
||||
):
|
||||
self.tree.heading(key, text=title)
|
||||
self.tree.column(key, width=width, anchor="w")
|
||||
self.tree.column("selected", anchor="center", stretch=False)
|
||||
self.tree.column(key, width=width, anchor="w", stretch=key in {"description", "memo"})
|
||||
self.tree.column("selected", anchor="center")
|
||||
self.tree.grid(row=0, column=0, sticky="nsew")
|
||||
scrollbar = ttk.Scrollbar(tree_frame, orient="vertical", command=self.tree.yview)
|
||||
scrollbar.grid(row=0, column=1, sticky="ns")
|
||||
|
||||
Reference in New Issue
Block a user