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)
|
||||
|
||||
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.pane(0, weight=0)
|
||||
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")
|
||||
|
||||
nav_buttons_container = ttk.Frame(
|
||||
sidebar_nav_frame, style="Sidebar.TFrame")
|
||||
sidebar_nav_frame)
|
||||
nav_buttons_container.pack(expand=True)
|
||||
|
||||
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")
|
||||
Tooltip(self.back_button, "Zurück")
|
||||
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)
|
||||
Tooltip(self.home_button, "Home")
|
||||
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")
|
||||
|
||||
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_frame)
|
||||
sidebar_buttons_frame.grid(row=2, column=0, sticky="nsew")
|
||||
sidebar_buttons_config = [
|
||||
{'name': 'Computer',
|
||||
@@ -291,13 +291,13 @@ class CustomFileDialog(tk.Toplevel):
|
||||
]
|
||||
for config in sidebar_buttons_config:
|
||||
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)
|
||||
|
||||
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)
|
||||
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_bar = ttk.Progressbar(
|
||||
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.grid(row=0, column=1)
|
||||
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")
|
||||
Tooltip(self.icon_view_button, "Kachelansicht")
|
||||
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")
|
||||
Tooltip(self.list_view_button, "Listenansicht")
|
||||
|
||||
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)
|
||||
Tooltip(self.hidden_files_button, "Versteckte Dateien anzeigen")
|
||||
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user