fix scrolbar in listview and fix view icons in listview

This commit is contained in:
2025-07-27 21:08:41 +02:00
parent 11f8d0e2fd
commit 7ab63d2a63
2 changed files with 3 additions and 3 deletions

View File

@@ -518,7 +518,7 @@ class CustomFileDialog(tk.Toplevel):
else:
icon, file_type, size = self.get_file_icon(
name, 'small'), "Datei", self._format_size(stat.st_size)
self.tree.insert("", "end", text=name, image=icon, values=(
self.tree.insert("", "end", text=f" {name}", image=icon, values=(
size, file_type, modified_time))
except (FileNotFoundError, PermissionError):
continue
@@ -541,7 +541,7 @@ class CustomFileDialog(tk.Toplevel):
if not self.tree.selection():
return
item_id = self.tree.selection()[0]
item_text = self.tree.item(item_id, 'text')
item_text = self.tree.item(item_id, 'text').strip()
self.selected_file = os.path.join(self.current_dir, item_text)
self.update_status_bar()
@@ -565,7 +565,7 @@ class CustomFileDialog(tk.Toplevel):
if not self.tree.selection():
return
item_id = self.tree.selection()[0]
item_text = self.tree.item(item_id, 'text')
item_text = self.tree.item(item_id, 'text').strip()
path = os.path.join(self.current_dir, item_text)
if self._handle_unsupported_file(path):
return