commit 18

This commit is contained in:
2025-07-29 12:08:35 +02:00
parent 4757df1710
commit 9fd0410e5a
3 changed files with 17 additions and 22 deletions

View File

@@ -177,6 +177,7 @@ 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
@@ -342,12 +343,13 @@ class CustomFileDialog(tk.Toplevel):
# Content area
content_frame = ttk.Frame(paned_window, padding=(
0, 0, 0, 0), style='Content.TFrame')
0, 0, 0, 0), style="AccentBottom.TFrame")
paned_window.add(content_frame, weight=1)
content_frame.grid_rowconfigure(0, weight=1)
content_frame.grid_columnconfigure(0, weight=1)
self.file_list_frame = ttk.Frame(content_frame, style="Content.TFrame")
self.file_list_frame = ttk.Frame(
content_frame, style="AccentBottom.TFrame")
self.file_list_frame.grid(row=0, column=0, sticky="nsew")
self.bind("<Configure>", self.on_window_resize)
@@ -357,31 +359,24 @@ class CustomFileDialog(tk.Toplevel):
bottom_controls_frame.grid(row=1, column=0, sticky="ew", pady=(5, 0))
bottom_controls_frame.grid_columnconfigure(1, weight=1)
self.status_bar = ttk.Label(
bottom_controls_frame, text="", anchor="w", style="AccentBottom.TLabel")
self.status_bar.grid(row=0, column=1, columnspan=2,
sticky="ew", padx=10, pady=10)
ttk.Button(bottom_controls_frame, text="Öffnen",
command=self.on_open).grid(row=0, column=0, padx=10)
ttk.Button(bottom_controls_frame, text="Abbrechen",
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=20)
self.filter_combobox.grid(row=0, column=0, sticky="w", padx=10, pady=5)
self.filter_combobox.grid(
row=1, column=1, sticky="w", padx=10, pady=(5, 10))
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="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")
ttk.Button(action_buttons_frame, text="Abbrechen",
command=self.on_cancel).pack(side="right", padx=5)
def toggle_hidden_files(self):
self.show_hidden_files.set(not self.show_hidden_files.get())
if self.show_hidden_files.get():

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', 'light')
root.tk.call('set_theme', 'dark')
except tk.TclError:
pass
root.mainloop()