Button-Größen reduziert und Fenstergrößen angepasst für bessere Proportionen

This commit is contained in:
René Mathieu
2026-01-17 14:22:20 +01:00
parent 1f265c0e3c
commit c086cbd8e1

76
gui.py
View File

@@ -55,9 +55,9 @@ class SettingsDialog:
self.load_config() # Laden der aktuellen Konfiguration
# Speichern-Button (macOS-Style) - größer und lesbarer
save_btn = create_macos_button(self.top, text="Speichern", command=self.save_config, width=20)
save_btn.grid(row=4, column=1, pady=15, padx=5)
# Speichern-Button (macOS-Style) - ausgewogene Größe
save_btn = create_macos_button(self.top, text="Speichern", command=self.save_config, width=16)
save_btn.grid(row=4, column=1, pady=12, padx=5)
def toggle_password_visibility(self):
"""Wechselt die Sichtbarkeit des Passworteingabefelds."""
@@ -116,8 +116,8 @@ class GUI:
self.bind_shortcuts()
# Fenstergröße und -position festlegen
window_width = 350
window_height = 150
window_width = 420
window_height = 180
screen_width = self.root.winfo_screenwidth()
screen_height = self.root.winfo_screenheight()
center_x = int(screen_width / 2 - window_width / 2)
@@ -130,15 +130,15 @@ class GUI:
# Frame für die Buttons am unteren Rand des Fensters
self.button_frame = tk.Frame(self.root)
self.button_frame.pack(side=tk.BOTTOM, fill=tk.X, pady=15)
self.button_frame.pack(side=tk.BOTTOM, fill=tk.X, pady=12)
# Durchsuchen Button (macOS-Style) - größer und lesbarer
self.browse_button = create_macos_button(self.button_frame, text="Durchsuchen", command=self.browse, width=18)
self.browse_button.pack(side=tk.LEFT, padx=15, expand=True, pady=5)
# Durchsuchen Button (macOS-Style) - ausgewogene Größe
self.browse_button = create_macos_button(self.button_frame, text="Durchsuchen", command=self.browse, width=14)
self.browse_button.pack(side=tk.LEFT, padx=12, expand=True, pady=4)
# Schließen Button (macOS-Style) - größer und lesbarer
self.close_button = create_macos_button(self.button_frame, text="Abbruch", command=self.on_app_close, width=18)
self.close_button.pack(side=tk.RIGHT, padx=15, expand=True, pady=5)
# Schließen Button (macOS-Style) - ausgewogene Größe
self.close_button = create_macos_button(self.button_frame, text="Abbruch", command=self.on_app_close, width=14)
self.close_button.pack(side=tk.RIGHT, padx=12, expand=True, pady=4)
self.hint_label = tk.Label(self.root, text="Bitte wählen Sie den Ordner mit den Bilddaten aus!")
self.hint_label.pack(pady=5) # Pady hinzugefügt für etwas Abstand nach oben und unten
@@ -406,20 +406,20 @@ class JaAbbruchDialog(tk.Toplevel):
# Button-Frame mit besserem Layout - Standard macOS Buttons
btn_frame = tk.Frame(main_frame)
btn_frame.pack(pady=20)
btn_frame.pack(pady=18)
# Standard macOS Buttons (ttk.Button für besseres macOS-Aussehen) - größer und lesbarer
# Standard macOS Buttons (ttk.Button für besseres macOS-Aussehen) - ausgewogene Größe
yes_btn = create_macos_button(btn_frame, text="Tomedo-Daten übernehmen",
command=self.on_yes, width=35)
yes_btn.pack(side=tk.LEFT, padx=12, pady=8)
command=self.on_yes, width=28)
yes_btn.pack(side=tk.LEFT, padx=10, pady=6)
no_btn = create_macos_button(btn_frame, text="Original-Daten behalten",
command=self.on_no, width=35)
no_btn.pack(side=tk.LEFT, padx=12, pady=8)
command=self.on_no, width=28)
no_btn.pack(side=tk.LEFT, padx=10, pady=6)
cancel_btn = create_macos_button(btn_frame, text="Abbruch",
command=self.on_cancel, width=25)
cancel_btn.pack(side=tk.LEFT, padx=12, pady=8)
command=self.on_cancel, width=20)
cancel_btn.pack(side=tk.LEFT, padx=10, pady=6)
self.center_window()
@@ -553,20 +553,20 @@ class ConfirmKeepOriginalDialog(tk.Toplevel):
# Button-Frame
btn_frame = tk.Frame(main_frame)
btn_frame.pack(pady=15)
btn_frame.pack(pady=12)
# Buttons (macOS-Style) - größer und lesbarer
# Buttons (macOS-Style) - ausgewogene Größe
tomedo_btn = create_macos_button(btn_frame, text="Tomedo-Daten verwenden",
command=self.on_use_tomedo, width=32)
tomedo_btn.pack(side=tk.LEFT, padx=10, pady=8)
command=self.on_use_tomedo, width=26)
tomedo_btn.pack(side=tk.LEFT, padx=8, pady=6)
keep_btn = create_macos_button(btn_frame, text="Original behalten",
command=self.on_keep_original, width=28)
keep_btn.pack(side=tk.LEFT, padx=10, pady=8)
command=self.on_keep_original, width=22)
keep_btn.pack(side=tk.LEFT, padx=8, pady=6)
cancel_btn = create_macos_button(btn_frame, text="Abbruch",
command=self.on_cancel, width=22)
cancel_btn.pack(side=tk.LEFT, padx=10, pady=8)
command=self.on_cancel, width=18)
cancel_btn.pack(side=tk.LEFT, padx=8, pady=6)
self.center_window()
@@ -634,21 +634,21 @@ class JaNeinAbbruchDialog(tk.Toplevel):
self.title(title)
self.geometry("450x200") # Größeres Fenster für bessere Lesbarkeit
tk.Label(self, text=self.message, font=('Helvetica', 13)).pack(pady=25)
self.geometry("420x180") # Angepasste Fenstergröße
tk.Label(self, text=self.message, font=('Helvetica', 13)).pack(pady=20)
btn_frame = tk.Frame(self)
btn_frame.pack(pady=15)
btn_frame.pack(pady=12)
# Buttons (macOS-Style) - größer und lesbarer
ja_btn = create_macos_button(btn_frame, text="Ja", command=self.on_ja, width=20)
ja_btn.pack(side=tk.LEFT, padx=12, pady=10)
# Buttons (macOS-Style) - ausgewogene Größe
ja_btn = create_macos_button(btn_frame, text="Ja", command=self.on_ja, width=16)
ja_btn.pack(side=tk.LEFT, padx=10, pady=6)
nein_btn = create_macos_button(btn_frame, text="Nein", command=self.on_nein, width=20)
nein_btn.pack(side=tk.LEFT, padx=12, pady=10)
nein_btn = create_macos_button(btn_frame, text="Nein", command=self.on_nein, width=16)
nein_btn.pack(side=tk.LEFT, padx=10, pady=6)
abbruch_btn = create_macos_button(btn_frame, text="Abbruch", command=self.on_abbruch, width=20)
abbruch_btn.pack(side=tk.LEFT, padx=12, pady=10)
abbruch_btn = create_macos_button(btn_frame, text="Abbruch", command=self.on_abbruch, width=16)
abbruch_btn.pack(side=tk.LEFT, padx=10, pady=6)
self.center_window()