commit 30

This commit is contained in:
2025-07-30 22:29:22 +02:00
parent 8a4d3d70c9
commit c010bd53cb
2 changed files with 9 additions and 3 deletions

View File

@@ -352,9 +352,15 @@ class CustomFileDialog(tk.Toplevel):
btn = ttk.Button(mounted_devices_frame, text=f" {device_name}", image=icon,
compound="left", command=lambda p=mount_point: self.navigate_to(p), style="Dark.TButton.Borderless")
btn.pack(fill="x", pady=1)
self.device_bar = ttk.Progressbar(
mounted_devices_frame, orient="horizontal", length=100, mode="determinate", style='Small.Horizontal.TProgressbar')
self.device_bar.pack(fill="x", pady=(2, 5), padx=15)
try:
total, used, _ = shutil.disk_usage(mount_point)
progress_bar = ttk.Progressbar(
mounted_devices_frame, orient="horizontal", length=100, mode="determinate", style='Small.Horizontal.TProgressbar')
progress_bar.pack(fill="x", pady=(2, 8), padx=25)
progress_bar['value'] = (used / total) * 100
except (FileNotFoundError, PermissionError):
# In case of errors (e.g., unreadable drive), just skip the progress bar
pass
tk.Frame(sidebar_frame, height=1, bg=separator_color).grid(
row=3, column=0, sticky="ew", padx=20, pady=15)