Alle Buttons auf macOS-Style (ttk.Button) umgestellt
This commit is contained in:
56
gui.py
56
gui.py
@@ -6,6 +6,14 @@ import os
|
||||
from queue import Queue
|
||||
import subprocess
|
||||
|
||||
def create_macos_button(parent, text, command=None, width=None, height=None, padx=10, pady=5):
|
||||
"""Erstellt einen Button im macOS-Stil"""
|
||||
# Verwende ttk.Button für besseres macOS-Aussehen
|
||||
btn = ttk.Button(parent, text=text, command=command)
|
||||
if width:
|
||||
btn.config(width=width)
|
||||
return btn
|
||||
|
||||
class SettingsDialog:
|
||||
def __init__(self, parent, config):
|
||||
self.config = config
|
||||
@@ -37,8 +45,9 @@ class SettingsDialog:
|
||||
|
||||
self.load_config() # Laden der aktuellen Konfiguration
|
||||
|
||||
# Speichern-Button
|
||||
Button(self.top, text="Speichern", command=self.save_config).grid(row=4, column=1, pady=10)
|
||||
# Speichern-Button (macOS-Style)
|
||||
save_btn = create_macos_button(self.top, text="Speichern", command=self.save_config)
|
||||
save_btn.grid(row=4, column=1, pady=10)
|
||||
|
||||
def toggle_password_visibility(self):
|
||||
"""Wechselt die Sichtbarkeit des Passworteingabefelds."""
|
||||
@@ -113,12 +122,12 @@ class GUI:
|
||||
self.button_frame = tk.Frame(self.root)
|
||||
self.button_frame.pack(side=tk.BOTTOM, fill=tk.X, pady=10)
|
||||
|
||||
# Durchsuchen Button
|
||||
self.browse_button = tk.Button(self.button_frame, text="Durchsuchen", command=self.browse)
|
||||
# Durchsuchen Button (macOS-Style)
|
||||
self.browse_button = create_macos_button(self.button_frame, text="Durchsuchen", command=self.browse)
|
||||
self.browse_button.pack(side=tk.LEFT, padx=10, expand=True)
|
||||
|
||||
# Schließen Button
|
||||
self.close_button = tk.Button(self.button_frame, text="Abbruch", command=self.on_app_close)
|
||||
# Schließen Button (macOS-Style)
|
||||
self.close_button = create_macos_button(self.button_frame, text="Abbruch", command=self.on_app_close)
|
||||
self.close_button.pack(side=tk.RIGHT, padx=10, expand=True)
|
||||
|
||||
self.hint_label = tk.Label(self.root, text="Bitte wählen Sie den Ordner mit den Bilddaten aus!")
|
||||
@@ -389,17 +398,17 @@ class JaAbbruchDialog(tk.Toplevel):
|
||||
btn_frame = tk.Frame(main_frame)
|
||||
btn_frame.pack(pady=15)
|
||||
|
||||
# Standard macOS Buttons (ohne spezielle Farben) - größer
|
||||
yes_btn = tk.Button(btn_frame, text="Tomedo-Daten übernehmen",
|
||||
command=self.on_yes, width=25, height=2)
|
||||
# Standard macOS Buttons (ttk.Button für besseres macOS-Aussehen)
|
||||
yes_btn = create_macos_button(btn_frame, text="Tomedo-Daten übernehmen",
|
||||
command=self.on_yes, width=25)
|
||||
yes_btn.pack(side=tk.LEFT, padx=10)
|
||||
|
||||
no_btn = tk.Button(btn_frame, text="Original-Daten behalten",
|
||||
command=self.on_no, width=25, height=2)
|
||||
no_btn = create_macos_button(btn_frame, text="Original-Daten behalten",
|
||||
command=self.on_no, width=25)
|
||||
no_btn.pack(side=tk.LEFT, padx=10)
|
||||
|
||||
cancel_btn = tk.Button(btn_frame, text="Abbruch",
|
||||
command=self.on_cancel, width=18, height=2)
|
||||
cancel_btn = create_macos_button(btn_frame, text="Abbruch",
|
||||
command=self.on_cancel, width=18)
|
||||
cancel_btn.pack(side=tk.LEFT, padx=10)
|
||||
|
||||
self.center_window()
|
||||
@@ -536,17 +545,17 @@ class ConfirmKeepOriginalDialog(tk.Toplevel):
|
||||
btn_frame = tk.Frame(main_frame)
|
||||
btn_frame.pack(pady=10)
|
||||
|
||||
# Buttons
|
||||
tomedo_btn = tk.Button(btn_frame, text="Tomedo-Daten verwenden",
|
||||
command=self.on_use_tomedo, width=22, height=2)
|
||||
# Buttons (macOS-Style)
|
||||
tomedo_btn = create_macos_button(btn_frame, text="Tomedo-Daten verwenden",
|
||||
command=self.on_use_tomedo, width=22)
|
||||
tomedo_btn.pack(side=tk.LEFT, padx=8)
|
||||
|
||||
keep_btn = tk.Button(btn_frame, text="Original behalten",
|
||||
command=self.on_keep_original, width=18, height=2)
|
||||
keep_btn = create_macos_button(btn_frame, text="Original behalten",
|
||||
command=self.on_keep_original, width=18)
|
||||
keep_btn.pack(side=tk.LEFT, padx=8)
|
||||
|
||||
cancel_btn = tk.Button(btn_frame, text="Abbruch",
|
||||
command=self.on_cancel, width=15, height=2)
|
||||
cancel_btn = create_macos_button(btn_frame, text="Abbruch",
|
||||
command=self.on_cancel, width=15)
|
||||
cancel_btn.pack(side=tk.LEFT, padx=8)
|
||||
|
||||
self.center_window()
|
||||
@@ -621,13 +630,14 @@ class JaNeinAbbruchDialog(tk.Toplevel):
|
||||
btn_frame = tk.Frame(self)
|
||||
btn_frame.pack(pady=10)
|
||||
|
||||
ja_btn = tk.Button(btn_frame, text="Ja", command=self.on_ja)
|
||||
# Buttons (macOS-Style)
|
||||
ja_btn = create_macos_button(btn_frame, text="Ja", command=self.on_ja)
|
||||
ja_btn.pack(side=tk.LEFT, padx=10, pady=20)
|
||||
|
||||
nein_btn = tk.Button(btn_frame, text="Nein", command=self.on_nein)
|
||||
nein_btn = create_macos_button(btn_frame, text="Nein", command=self.on_nein)
|
||||
nein_btn.pack(side=tk.LEFT, padx=10, pady=20)
|
||||
|
||||
abbruch_btn = tk.Button(btn_frame, text="Abbruch", command=self.on_abbruch)
|
||||
abbruch_btn = create_macos_button(btn_frame, text="Abbruch", command=self.on_abbruch)
|
||||
abbruch_btn.pack(side=tk.LEFT, padx=10, pady=20)
|
||||
|
||||
self.center_window()
|
||||
|
||||
Reference in New Issue
Block a user