commit 18
This commit is contained in:
Binary file not shown.
@@ -177,6 +177,7 @@ class CustomFileDialog(tk.Toplevel):
|
|||||||
self.hover_extrastyle = "#4a4a4a" # Hover Color for Buttons in header and Sidebar
|
self.hover_extrastyle = "#4a4a4a" # Hover Color for Buttons in header and Sidebar
|
||||||
self.hover_extrastyle2 = "#494949"
|
self.hover_extrastyle2 = "#494949"
|
||||||
self.sidebar_color = "#333333"
|
self.sidebar_color = "#333333"
|
||||||
|
self.bottom_color = self.accent_color
|
||||||
self.color_foreground = "#ffffff"
|
self.color_foreground = "#ffffff"
|
||||||
self.freespace_background = self.sidebar_color
|
self.freespace_background = self.sidebar_color
|
||||||
|
|
||||||
@@ -342,12 +343,13 @@ class CustomFileDialog(tk.Toplevel):
|
|||||||
|
|
||||||
# Content area
|
# Content area
|
||||||
content_frame = ttk.Frame(paned_window, padding=(
|
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)
|
paned_window.add(content_frame, weight=1)
|
||||||
content_frame.grid_rowconfigure(0, weight=1)
|
content_frame.grid_rowconfigure(0, weight=1)
|
||||||
content_frame.grid_columnconfigure(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.file_list_frame.grid(row=0, column=0, sticky="nsew")
|
||||||
self.bind("<Configure>", self.on_window_resize)
|
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(row=1, column=0, sticky="ew", pady=(5, 0))
|
||||||
bottom_controls_frame.grid_columnconfigure(1, weight=1)
|
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(
|
self.filter_combobox = ttk.Combobox(
|
||||||
bottom_controls_frame, values=[ft[0] for ft in self.filetypes], state="readonly", width=20)
|
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(
|
self.filter_combobox.bind(
|
||||||
"<<ComboboxSelected>>", self.on_filter_change)
|
"<<ComboboxSelected>>", self.on_filter_change)
|
||||||
self.filter_combobox.set(self.filetypes[0][0])
|
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):
|
def toggle_hidden_files(self):
|
||||||
self.show_hidden_files.set(not self.show_hidden_files.get())
|
self.show_hidden_files.set(not self.show_hidden_files.get())
|
||||||
if self.show_hidden_files.get():
|
if self.show_hidden_files.get():
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ if __name__ == "__main__":
|
|||||||
style = ttk.Style(root)
|
style = ttk.Style(root)
|
||||||
root.tk.call('source', f"{theme_path}/water.tcl")
|
root.tk.call('source', f"{theme_path}/water.tcl")
|
||||||
try:
|
try:
|
||||||
root.tk.call('set_theme', 'light')
|
root.tk.call('set_theme', 'dark')
|
||||||
except tk.TclError:
|
except tk.TclError:
|
||||||
pass
|
pass
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|||||||
Reference in New Issue
Block a user