macOS Buttons: Aqua Theme explizit aktiviert für natives macOS-Aussehen
This commit is contained in:
9
gui.py
9
gui.py
@@ -10,15 +10,20 @@ import subprocess
|
||||
_style_configured = False
|
||||
|
||||
def create_macos_button(parent, text, command=None, width=None, height=None, padx=10, pady=5):
|
||||
"""Erstellt einen Button im macOS-Stil mit größerer, lesbarerer Darstellung"""
|
||||
"""Erstellt einen Button im nativen macOS-Stil (Aqua Theme)"""
|
||||
global _style_configured
|
||||
# Style nur einmal konfigurieren
|
||||
if not _style_configured:
|
||||
style = ttk.Style()
|
||||
# Verwende das native macOS Aqua Theme
|
||||
try:
|
||||
style.theme_use('aqua') # macOS natives Theme
|
||||
except:
|
||||
pass # Falls aqua nicht verfügbar ist, verwende Standard
|
||||
style.configure('TButton', font=('Helvetica', 13))
|
||||
_style_configured = True
|
||||
|
||||
# Verwende ttk.Button für besseres macOS-Aussehen
|
||||
# Verwende ttk.Button für natives macOS-Aussehen
|
||||
btn = ttk.Button(parent, text=text, command=command)
|
||||
if width:
|
||||
btn.config(width=width)
|
||||
|
||||
Reference in New Issue
Block a user