bessere anzeige der einzelnen icons

This commit is contained in:
2025-07-27 00:29:55 +02:00
parent cad67a0c35
commit 872513f348
2 changed files with 7 additions and 7 deletions

View File

@@ -197,13 +197,13 @@ class CustomFileDialog(tk.Toplevel):
('selected', "black" if not is_dark else "white")])
def create_widgets(self):
main_frame = ttk.Frame(self, padding="10")
main_frame = ttk.Frame(self, padding=(0, 0, 10, 0))
main_frame.pack(fill="both", expand=True)
paned_window = ttk.PanedWindow(main_frame, orient=tk.HORIZONTAL)
paned_window.pack(fill="both", expand=True)
sidebar_frame = ttk.Frame(paned_window, padding=(
10, 10, 5, 10), style="Sidebar.TFrame")
15, 5, 15, 0), style="Sidebar.TFrame")
paned_window.add(sidebar_frame, weight=0)
sidebar_frame.grid_rowconfigure(1, weight=1)
@@ -241,7 +241,7 @@ class CustomFileDialog(tk.Toplevel):
compound="top", command=lambda p=config['path']: self.navigate_to(p), style="Sidebar.TButton")
btn.pack(fill="x", pady=1)
content_frame = ttk.Frame(paned_window, padding=(10, 10, 10, 10))
content_frame = ttk.Frame(paned_window, padding=(5, 0, 0, 0))
paned_window.add(content_frame, weight=1)
content_frame.grid_rowconfigure(2, weight=1)
content_frame.grid_columnconfigure(0, weight=1)
@@ -286,7 +286,7 @@ class CustomFileDialog(tk.Toplevel):
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)
command=self.on_cancel).pack(side="right", padx=5, pady=15)
def on_window_resize(self, event):
new_width = self.file_list_frame.winfo_width()
@@ -364,9 +364,9 @@ class CustomFileDialog(tk.Toplevel):
ttk.Label(container_frame, text=error).pack(pady=20)
return
item_width, item_height = 110, 100
item_width, item_height = 125, 100
frame_width = self.file_list_frame.winfo_width()
col_count = max(1, frame_width // item_width)
col_count = max(1, frame_width // item_width - 1)
row, col = 0, 0
for name in items:
if not self.show_hidden_files.get() and name.startswith('.'):
@@ -378,7 +378,7 @@ class CustomFileDialog(tk.Toplevel):
item_frame = ttk.Frame(
container_frame, width=item_width, height=item_height, style="Item.TFrame")
item_frame.grid(row=row, column=col, padx=5, pady=5)
item_frame.grid(row=row, column=col, padx=5, ipadx=25, pady=5)
item_frame.grid_propagate(False)
icon = self.icons['folder_large'] if is_dir else self.get_file_icon(
name, 'large')