commit 15
This commit is contained in:
Binary file not shown.
@@ -244,36 +244,36 @@ class CustomFileDialog(tk.Toplevel):
|
|||||||
paned_window.pack(fill="both", expand=True)
|
paned_window.pack(fill="both", expand=True)
|
||||||
|
|
||||||
sidebar_frame = ttk.Frame(paned_window, padding=(
|
sidebar_frame = ttk.Frame(paned_window, padding=(
|
||||||
15, 10, 15, 15), style="Sidebar.TFrame")
|
15, 10, 15, 15))
|
||||||
paned_window.add(sidebar_frame, weight=0)
|
paned_window.add(sidebar_frame, weight=0)
|
||||||
|
|
||||||
paned_window.pane(0, weight=0)
|
paned_window.pane(0, weight=0)
|
||||||
sidebar_frame.grid_rowconfigure(2, weight=1)
|
sidebar_frame.grid_rowconfigure(2, weight=1)
|
||||||
|
|
||||||
sidebar_nav_frame = ttk.Frame(sidebar_frame, style="Sidebar.TFrame")
|
sidebar_nav_frame = ttk.Frame(sidebar_frame)
|
||||||
sidebar_nav_frame.grid(row=0, column=0, sticky="ew")
|
sidebar_nav_frame.grid(row=0, column=0, sticky="ew")
|
||||||
|
|
||||||
nav_buttons_container = ttk.Frame(
|
nav_buttons_container = ttk.Frame(
|
||||||
sidebar_nav_frame, style="Sidebar.TFrame")
|
sidebar_nav_frame)
|
||||||
nav_buttons_container.pack(expand=True)
|
nav_buttons_container.pack(expand=True)
|
||||||
|
|
||||||
self.back_button = ttk.Button(
|
self.back_button = ttk.Button(
|
||||||
nav_buttons_container, image=self.icons['back'], command=self.go_back, state=tk.DISABLED, style="Toolbutton.TButton")
|
nav_buttons_container, image=self.icons['back'], command=self.go_back, state=tk.DISABLED, style="TButton.Borderless.Round")
|
||||||
self.back_button.pack(side="left")
|
self.back_button.pack(side="left")
|
||||||
Tooltip(self.back_button, "Zurück")
|
Tooltip(self.back_button, "Zurück")
|
||||||
self.home_button = ttk.Button(nav_buttons_container, 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")
|
os.path.expanduser("~")), style="TButton.Borderless.Round")
|
||||||
self.home_button.pack(side="left", padx=2)
|
self.home_button.pack(side="left", padx=2)
|
||||||
Tooltip(self.home_button, "Home")
|
Tooltip(self.home_button, "Home")
|
||||||
self.forward_button = ttk.Button(
|
self.forward_button = ttk.Button(
|
||||||
nav_buttons_container, image=self.icons['forward'], command=self.go_forward, state=tk.DISABLED, style="Toolbutton.TButton")
|
nav_buttons_container, image=self.icons['forward'], command=self.go_forward, state=tk.DISABLED, style="TButton.Borderless.Round")
|
||||||
self.forward_button.pack(side="left")
|
self.forward_button.pack(side="left")
|
||||||
|
|
||||||
ttk.Separator(sidebar_frame, orient='horizontal').grid(
|
ttk.Separator(sidebar_frame, orient='horizontal').grid(
|
||||||
row=1, column=0, sticky="ew", pady=5)
|
row=1, column=0, sticky="ew", pady=5)
|
||||||
|
|
||||||
sidebar_buttons_frame = ttk.Frame(
|
sidebar_buttons_frame = ttk.Frame(
|
||||||
sidebar_frame, style="Sidebar.TFrame")
|
sidebar_frame)
|
||||||
sidebar_buttons_frame.grid(row=2, column=0, sticky="nsew")
|
sidebar_buttons_frame.grid(row=2, column=0, sticky="nsew")
|
||||||
sidebar_buttons_config = [
|
sidebar_buttons_config = [
|
||||||
{'name': 'Computer',
|
{'name': 'Computer',
|
||||||
@@ -291,13 +291,13 @@ class CustomFileDialog(tk.Toplevel):
|
|||||||
]
|
]
|
||||||
for config in sidebar_buttons_config:
|
for config in sidebar_buttons_config:
|
||||||
btn = ttk.Button(sidebar_buttons_frame, text=f" {config['name']}", image=config['icon'],
|
btn = ttk.Button(sidebar_buttons_frame, text=f" {config['name']}", image=config['icon'],
|
||||||
compound="top", command=lambda p=config['path']: self.navigate_to(p), style="Sidebar.TButton")
|
compound="top", command=lambda p=config['path']: self.navigate_to(p), style="TButton.Borderless")
|
||||||
btn.pack(fill="x", pady=1)
|
btn.pack(fill="x", pady=1)
|
||||||
|
|
||||||
storage_frame = ttk.Frame(sidebar_frame, style="Sidebar.TFrame")
|
storage_frame = ttk.Frame(sidebar_frame)
|
||||||
storage_frame.grid(row=3, column=0, sticky="ew", padx=10)
|
storage_frame.grid(row=3, column=0, sticky="ew", padx=10)
|
||||||
self.storage_label = ttk.Label(
|
self.storage_label = ttk.Label(
|
||||||
storage_frame, text="Freier Speicher:", style="Sidebar.TLabel")
|
storage_frame, text="Freier Speicher:")
|
||||||
self.storage_label.pack(fill="x")
|
self.storage_label.pack(fill="x")
|
||||||
self.storage_bar = ttk.Progressbar(
|
self.storage_bar = ttk.Progressbar(
|
||||||
storage_frame, orient="horizontal", length=100, mode="determinate")
|
storage_frame, orient="horizontal", length=100, mode="determinate")
|
||||||
@@ -320,16 +320,16 @@ class CustomFileDialog(tk.Toplevel):
|
|||||||
view_switch = ttk.Frame(top_bar, padding=(5, 0), style='Accent.TFrame')
|
view_switch = ttk.Frame(top_bar, padding=(5, 0), style='Accent.TFrame')
|
||||||
view_switch.grid(row=0, column=1)
|
view_switch.grid(row=0, column=1)
|
||||||
self.icon_view_button = ttk.Button(view_switch, image=self.icons['icon_view'], command=lambda: (
|
self.icon_view_button = ttk.Button(view_switch, image=self.icons['icon_view'], command=lambda: (
|
||||||
self.view_mode.set("icons"), self.populate_files()), style="Toolbutton_right.TButton")
|
self.view_mode.set("icons"), self.populate_files()), style="TButton.Borderless.Round")
|
||||||
self.icon_view_button.pack(side="left")
|
self.icon_view_button.pack(side="left")
|
||||||
Tooltip(self.icon_view_button, "Kachelansicht")
|
Tooltip(self.icon_view_button, "Kachelansicht")
|
||||||
self.list_view_button = ttk.Button(view_switch, image=self.icons['list_view'], command=lambda: (
|
self.list_view_button = ttk.Button(view_switch, image=self.icons['list_view'], command=lambda: (
|
||||||
self.view_mode.set("list"), self.populate_files()), style="Toolbutton_right.TButton")
|
self.view_mode.set("list"), self.populate_files()), style="TButton.Borderless.Round")
|
||||||
self.list_view_button.pack(side="left")
|
self.list_view_button.pack(side="left")
|
||||||
Tooltip(self.list_view_button, "Listenansicht")
|
Tooltip(self.list_view_button, "Listenansicht")
|
||||||
|
|
||||||
self.hidden_files_button = ttk.Button(
|
self.hidden_files_button = ttk.Button(
|
||||||
top_bar, image=self.icons['hide'], command=self.toggle_hidden_files, style="Toolbutton_right.TButton")
|
top_bar, image=self.icons['hide'], command=self.toggle_hidden_files, style="TButton.Borderless.Round")
|
||||||
self.hidden_files_button.grid(row=0, column=2, padx=5)
|
self.hidden_files_button.grid(row=0, column=2, padx=5)
|
||||||
Tooltip(self.hidden_files_button, "Versteckte Dateien anzeigen")
|
Tooltip(self.hidden_files_button, "Versteckte Dateien anzeigen")
|
||||||
|
|
||||||
|
|||||||
@@ -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', 'dark')
|
root.tk.call('set_theme', 'light')
|
||||||
except tk.TclError:
|
except tk.TclError:
|
||||||
pass
|
pass
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|||||||
Reference in New Issue
Block a user