commit 17

This commit is contained in:
2025-07-29 10:28:13 +02:00
parent 0d82a91e69
commit 4757df1710
3 changed files with 28 additions and 21 deletions

View File

@@ -178,6 +178,7 @@ class CustomFileDialog(tk.Toplevel):
self.hover_extrastyle2 = "#494949"
self.sidebar_color = "#333333"
self.color_foreground = "#ffffff"
self.freespace_background = self.sidebar_color
else:
self.selection_color = "#cce5ff" # Light blue for selection
@@ -188,7 +189,9 @@ class CustomFileDialog(tk.Toplevel):
# 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 = "#d9d9d9"
self.sidebar_color = "#e7e7e7"
self.bottom_color = "#d9d9d9"
self.freespace_background = self.sidebar_color
self.color_foreground = "#000000"
style.configure("Header.TButton.Borderless.Round",
@@ -198,14 +201,15 @@ class CustomFileDialog(tk.Toplevel):
('active', self.hover_extrastyle)])
style.configure("Dark.TButton.Borderless", anchor="w",
background=self.sidebar_color, foreground=self.color_foreground)
background=self.sidebar_color, foreground=self.color_foreground, padding=(20, 5, 0, 5))
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.configure("Content.TFrame", background=self.icon_bg_color)
@@ -329,11 +333,12 @@ 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:")
self.storage_label.pack(fill="x")
self.storage_label = ttk.Label(
storage_frame, text="Freier Speicher:", background=self.freespace_background)
self.storage_label.pack(fill="x", padx=10)
self.storage_bar = ttk.Progressbar(
storage_frame, orient="horizontal", length=100, mode="determinate")
self.storage_bar.pack(fill="x", pady=(2, 5))
self.storage_bar.pack(fill="x", pady=(2, 5), padx=15)
# Content area
content_frame = ttk.Frame(paned_window, padding=(
@@ -347,28 +352,30 @@ class CustomFileDialog(tk.Toplevel):
self.bind("<Configure>", self.on_window_resize)
# Bottom controls
bottom_controls_frame = ttk.Frame(content_frame, style="Accent.TFrame")
bottom_controls_frame = ttk.Frame(
content_frame, style="AccentBottom.TFrame")
bottom_controls_frame.grid(row=1, column=0, sticky="ew", pady=(5, 0))
bottom_controls_frame.grid_columnconfigure(0, weight=1)
self.status_bar = ttk.Label(
bottom_controls_frame, text="", anchor="w", style="Accent.TLabel")
self.status_bar.grid(row=0, column=0, sticky="ew")
right_side_buttons_frame = ttk.Frame(
bottom_controls_frame, style="Accent.TFrame")
right_side_buttons_frame.grid(row=0, column=1, sticky="e")
bottom_controls_frame.grid_columnconfigure(1, weight=1)
self.filter_combobox = ttk.Combobox(
right_side_buttons_frame, values=[ft[0] for ft in self.filetypes], state="readonly", width=20)
self.filter_combobox.pack(anchor="e", pady=10)
bottom_controls_frame, values=[ft[0] for ft in self.filetypes], state="readonly", width=20)
self.filter_combobox.grid(row=0, column=0, sticky="w", padx=10, pady=5)
self.filter_combobox.bind(
"<<ComboboxSelected>>", self.on_filter_change)
self.filter_combobox.set(self.filetypes[0][0])
self.status_bar = ttk.Label(
bottom_controls_frame, text="", anchor="w", style="AccentBottom.TLabel")
self.status_bar.grid(row=1, column=0, columnspan=2,
sticky="ew", padx=10, pady=10)
right_side_buttons_frame = ttk.Frame(
bottom_controls_frame, style="AccentBottom.TFrame")
right_side_buttons_frame.grid(row=1, column=1, sticky="e")
action_buttons_frame = ttk.Frame(
right_side_buttons_frame, style="Accent.TFrame")
action_buttons_frame.pack(anchor="e", pady=(0, 10))
right_side_buttons_frame, style="AccentBottom.TFrame")
action_buttons_frame.pack(anchor="e", pady=(0, 10), padx=10)
ttk.Button(action_buttons_frame, text="Öffnen",
command=self.on_open).pack(side="right")

View File

@@ -58,7 +58,7 @@ if __name__ == "__main__":
style = ttk.Style(root)
root.tk.call('source', f"{theme_path}/water.tcl")
try:
root.tk.call('set_theme', 'dark')
root.tk.call('set_theme', 'light')
except tk.TclError:
pass
root.mainloop()