diff --git a/src/ccma/ui/claim_tab.py b/src/ccma/ui/claim_tab.py index 0ef4af7..fc875fb 100644 --- a/src/ccma/ui/claim_tab.py +++ b/src/ccma/ui/claim_tab.py @@ -994,24 +994,33 @@ class ReminderDialog(_Dialog): self.items_tree.grid(row=0, column=0, sticky="ew") self.items_tree.bind("<>", lambda _event: self._load_selected_item()) - controls = ttk.Frame(table_frame) - controls.grid(row=1, column=0, sticky="ew", pady=(8, 0)) + # Edit row lines up under the table's own columns (same 220:100 width ratio as + # "Beschreibung"/"Betrag" above) instead of the fields and buttons being crammed + # into one row. + edit_row = ttk.Frame(table_frame) + edit_row.grid(row=1, column=0, sticky="ew", pady=(8, 0)) + edit_row.columnconfigure(0, weight=22) + edit_row.columnconfigure(1, weight=10) self.item_description_var = tk.StringVar() description_combo = ttk.Combobox( - controls, + edit_row, textvariable=self.item_description_var, values=[str(entry.get("description", "")) for entry in self.policy["standard_fee_items"]], - width=22, ) - description_combo.pack(side="left", padx=(0, 8)) + description_combo.grid(row=0, column=0, sticky="ew", padx=(0, 8)) description_combo.bind("<>", lambda _event: self._prefill_item_amount()) self.item_amount_var = tk.StringVar() - ttk.Entry(controls, textvariable=self.item_amount_var, width=10).pack(side="left", padx=(0, 8)) - ttk.Button(controls, text="Position hinzufügen", command=self._add_item).pack( + ttk.Entry(edit_row, textvariable=self.item_amount_var).grid(row=0, column=1, sticky="ew") + + buttons_row = ttk.Frame(table_frame) + buttons_row.grid(row=2, column=0, sticky="w", pady=(8, 0)) + ttk.Button(buttons_row, text="Position hinzufügen", command=self._add_item).pack( side="left", padx=(0, 8) ) - ttk.Button(controls, text="Aktualisieren", command=self._update_item).pack(side="left", padx=(0, 8)) - ttk.Button(controls, text="Position entfernen", command=self._remove_item).pack(side="left") + ttk.Button(buttons_row, text="Aktualisieren", command=self._update_item).pack( + side="left", padx=(0, 8) + ) + ttk.Button(buttons_row, text="Position entfernen", command=self._remove_item).pack(side="left") def _prefill_item_amount(self) -> None: description = self.item_description_var.get()