commit 20

This commit is contained in:
2025-07-29 12:41:31 +02:00
parent 3ddbf026da
commit 7cc2658433
2 changed files with 17 additions and 11 deletions

View File

@@ -177,7 +177,6 @@ class CustomFileDialog(tk.Toplevel):
self.hover_extrastyle = "#4a4a4a" # Hover Color for Buttons in header and Sidebar
self.hover_extrastyle2 = "#494949"
self.sidebar_color = "#333333"
self.bottom_color = self.accent_color
self.color_foreground = "#ffffff"
self.freespace_background = self.sidebar_color
style.configure("TSeparator", background="#000000")
@@ -190,12 +189,11 @@ class CustomFileDialog(tk.Toplevel):
self.header = "#ffffff"
# Hover Color for Buttons in header and Sidebar
self.hover_extrastyle = "#f5f5f5"
self.hover_extrastyle2 = "#494949" # Hover Color for Buttons in Sidebar
self.sidebar_color = "#e7e7e7"
self.bottom_color = "#d9d9d9"
self.freespace_background = self.sidebar_color
self.hover_extrastyle2 = "#e0e0e0" # Corrected hover color for light theme
self.sidebar_color = "#d9d9d9"
self.color_foreground = "#000000"
style.configure("TSeparator", background="#d9d9d9")
self.freespace_background = self.sidebar_color
style.configure("TSeparator", background="#cccccc")
style.configure("Header.TButton.Borderless.Round",
background=self.header)
@@ -203,18 +201,26 @@ class CustomFileDialog(tk.Toplevel):
style.map("Header.TButton.Borderless.Round", background=[
('active', self.hover_extrastyle)])
# Symmetrical padding and no border should help with consistent look and hover
style.configure("Dark.TButton.Borderless", anchor="w",
background=self.sidebar_color, foreground=self.color_foreground, padding=(20, 5, 0, 5))
background=self.sidebar_color, foreground=self.color_foreground,
padding=(10, 5, 10, 5), borderwidth=0, relief="flat")
style.map("Dark.TButton.Borderless", background=[
('active', self.hover_extrastyle2)])
style.configure("Accent.TFrame", background=self.header)
style.configure("Accent.TLabel", background=self.header)
style.configure("AccentBottom.TFrame", background=self.bottom_color)
style.configure("AccentBottom.TLabel", background=self.bottom_color)
style.configure("Sidebar.TFrame", background=self.sidebar_color)
# Style for Combobox to control height via padding
style.configure("TCombobox", padding=(0, 4, 0, 4), width=15)
style.map("TCombobox", fieldbackground=[('readonly', self.header if not is_dark else self.icon_bg_color)])
style.map("TCombobox", selectbackground=[('readonly', self.header if not is_dark else self.icon_bg_color)])
style.map("TCombobox", selectforeground=[('readonly', self.color_foreground)])
style.configure("Content.TFrame", background=self.icon_bg_color)
style.configure("Item.TFrame", background=self.icon_bg_color)
style.map('Item.TFrame', background=[
@@ -339,7 +345,7 @@ class CustomFileDialog(tk.Toplevel):
storage_frame = ttk.Frame(sidebar_frame, style="Sidebar.TFrame")
storage_frame.grid(row=1, column=0, sticky="ew", padx=10)
self.storage_label = ttk.Label(
storage_frame, text="Freier Speicher:", background=self.freespace_background)
storage_frame, text="Freier Speicher:")
self.storage_label.pack(fill="x", padx=10)
self.storage_bar = ttk.Progressbar(
storage_frame, orient="horizontal", length=100, mode="determinate")
@@ -374,7 +380,7 @@ class CustomFileDialog(tk.Toplevel):
command=self.on_cancel).grid(row=1, column=0, padx=10)
self.filter_combobox = ttk.Combobox(
bottom_controls_frame, values=[ft[0] for ft in self.filetypes], state="readonly", width=15)
bottom_controls_frame, values=[ft[0] for ft in self.filetypes], state="readonly")
self.filter_combobox.grid(
row=1, column=1, sticky="w", padx=10, pady=(5, 10))
self.filter_combobox.bind(