commit 13
This commit is contained in:
Binary file not shown.
@@ -172,11 +172,16 @@ class CustomFileDialog(tk.Toplevel):
|
||||
if is_dark:
|
||||
self.selection_color = "#4a6984" # Darker blue for selection
|
||||
self.sidebar_color = "#2c2c2c" # Slightly lighter dark grey for sidebar
|
||||
self.icon_bg_color = "#333333" # Main background for content
|
||||
self.icon_bg_color = "#3c3c3c" # Lighter background for content
|
||||
self.accent_color = "#2a2a2a" # Darker accent for the bottom
|
||||
else:
|
||||
self.selection_color = "#cce5ff" # Light blue for selection
|
||||
self.sidebar_color = "#f0f0f0" # Light grey for sidebar
|
||||
self.icon_bg_color = base_bg # Main background for content
|
||||
self.accent_color = "#e0e0e0"
|
||||
|
||||
style.configure("Accent.TFrame", background=self.accent_color)
|
||||
style.configure("Accent.TLabel", background=self.accent_color)
|
||||
|
||||
style.configure("Sidebar.TFrame", background=self.sidebar_color)
|
||||
style.configure("Sidebar.TButton", background=self.sidebar_color,
|
||||
@@ -234,25 +239,32 @@ class CustomFileDialog(tk.Toplevel):
|
||||
15, 10, 15, 15), style="Sidebar.TFrame")
|
||||
paned_window.add(sidebar_frame, weight=0)
|
||||
paned_window.pane(0, weight=0)
|
||||
sidebar_frame.grid_rowconfigure(1, weight=1)
|
||||
sidebar_frame.grid_rowconfigure(2, weight=1)
|
||||
|
||||
sidebar_nav_frame = ttk.Frame(sidebar_frame, style="Sidebar.TFrame")
|
||||
sidebar_nav_frame.grid(row=0, column=0, sticky="ew", pady=(0, 10))
|
||||
sidebar_nav_frame.grid(row=0, column=0, sticky="ew")
|
||||
|
||||
nav_buttons_container = ttk.Frame(sidebar_nav_frame, style="Sidebar.TFrame")
|
||||
nav_buttons_container.pack(expand=True)
|
||||
|
||||
self.back_button = ttk.Button(
|
||||
sidebar_nav_frame, image=self.icons['back'], command=self.go_back, state=tk.DISABLED, style="Toolbutton.TButton")
|
||||
self.back_button.pack(side="left", fill="x", expand=True)
|
||||
nav_buttons_container, image=self.icons['back'], command=self.go_back, state=tk.DISABLED, style="Toolbutton.TButton")
|
||||
self.back_button.pack(side="left")
|
||||
Tooltip(self.back_button, "Zurück")
|
||||
self.home_button = ttk.Button(sidebar_nav_frame, image=self.icons['home'], command=lambda: self.navigate_to(
|
||||
self.home_button = ttk.Button(nav_buttons_container, image=self.icons['home'], command=lambda: self.navigate_to(
|
||||
os.path.expanduser("~")), style="Toolbutton.TButton")
|
||||
self.home_button.pack(side="left", fill="x", expand=True, padx=2)
|
||||
self.home_button.pack(side="left", padx=2)
|
||||
Tooltip(self.home_button, "Home")
|
||||
self.forward_button = ttk.Button(
|
||||
sidebar_nav_frame, image=self.icons['forward'], command=self.go_forward, state=tk.DISABLED, style="Toolbutton.TButton")
|
||||
self.forward_button.pack(side="left", fill="x", expand=True)
|
||||
nav_buttons_container, image=self.icons['forward'], command=self.go_forward, state=tk.DISABLED, style="Toolbutton.TButton")
|
||||
self.forward_button.pack(side="left")
|
||||
|
||||
ttk.Separator(sidebar_frame, orient='horizontal').grid(
|
||||
row=1, column=0, sticky="ew", pady=5)
|
||||
|
||||
sidebar_buttons_frame = ttk.Frame(
|
||||
sidebar_frame, style="Sidebar.TFrame")
|
||||
sidebar_buttons_frame.grid(row=1, column=0, sticky="nsew")
|
||||
sidebar_buttons_frame.grid(row=2, column=0, sticky="nsew")
|
||||
sidebar_buttons_config = [
|
||||
{'name': 'Computer',
|
||||
'icon': self.icons['computer_large'], 'path': '/'},
|
||||
@@ -273,7 +285,7 @@ class CustomFileDialog(tk.Toplevel):
|
||||
btn.pack(fill="x", pady=1)
|
||||
|
||||
storage_frame = ttk.Frame(sidebar_frame, style="Sidebar.TFrame")
|
||||
storage_frame.grid(row=2, column=0, sticky="ew", padx=10)
|
||||
storage_frame.grid(row=3, column=0, sticky="ew", padx=10)
|
||||
self.storage_label = ttk.Label(
|
||||
storage_frame, text="Freier Speicher:", style="Sidebar.TLabel")
|
||||
self.storage_label.pack(fill="x")
|
||||
@@ -317,14 +329,14 @@ class CustomFileDialog(tk.Toplevel):
|
||||
self.file_list_frame.grid(row=2, column=0, sticky="nsew")
|
||||
self.bind("<Configure>", self.on_window_resize)
|
||||
|
||||
bottom_controls_frame = ttk.Frame(content_frame)
|
||||
bottom_controls_frame = ttk.Frame(content_frame, style="Accent.TFrame")
|
||||
bottom_controls_frame.grid(row=3, 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")
|
||||
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)
|
||||
right_side_buttons_frame = ttk.Frame(bottom_controls_frame, style="Accent.TFrame")
|
||||
right_side_buttons_frame.grid(row=0, column=1, sticky="e")
|
||||
|
||||
self.filter_combobox = ttk.Combobox(
|
||||
@@ -334,7 +346,7 @@ class CustomFileDialog(tk.Toplevel):
|
||||
"<<ComboboxSelected>>", self.on_filter_change)
|
||||
self.filter_combobox.set(self.filetypes[0][0])
|
||||
|
||||
action_buttons_frame = ttk.Frame(right_side_buttons_frame)
|
||||
action_buttons_frame = ttk.Frame(right_side_buttons_frame, style="Accent.TFrame")
|
||||
action_buttons_frame.pack(anchor="e", pady=(0, 10))
|
||||
|
||||
ttk.Button(action_buttons_frame, text="Öffnen",
|
||||
|
@@ -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', 'light')
|
||||
root.tk.call('set_theme', 'dark')
|
||||
except tk.TclError:
|
||||
pass
|
||||
root.mainloop()
|
||||
|
Reference in New Issue
Block a user