diff --git a/__pycache__/custom_file_dialog.cpython-312.pyc b/__pycache__/custom_file_dialog.cpython-312.pyc index 3dabb64..e593a7a 100644 Binary files a/__pycache__/custom_file_dialog.cpython-312.pyc and b/__pycache__/custom_file_dialog.cpython-312.pyc differ diff --git a/custom_file_dialog.py b/custom_file_dialog.py index de5fa94..9cd9ccc 100644 --- a/custom_file_dialog.py +++ b/custom_file_dialog.py @@ -177,9 +177,9 @@ class CustomFileDialog(tk.Toplevel): self.hover_extrastyle = "#4a4a4a" # Hover Color for Buttons in header and Sidebar self.hover_extrastyle2 = "#494949" self.sidebar_color = "#333333" + self.bottom_color = self.accent_color self.color_foreground = "#ffffff" self.freespace_background = self.sidebar_color - style.configure("TSeparator", background="#000000") else: self.selection_color = "#cce5ff" # Light blue for selection @@ -189,11 +189,11 @@ class CustomFileDialog(tk.Toplevel): self.header = "#ffffff" # Hover Color for Buttons in header and Sidebar self.hover_extrastyle = "#f5f5f5" - self.hover_extrastyle2 = "#e0e0e0" # Corrected hover color for light theme - self.sidebar_color = "#d9d9d9" - self.color_foreground = "#000000" + self.hover_extrastyle2 = "#494949" # Hover Color for Buttons in Sidebar + self.sidebar_color = "#e7e7e7" + self.bottom_color = "#d9d9d9" self.freespace_background = self.sidebar_color - style.configure("TSeparator", background="#cccccc") + self.color_foreground = "#000000" style.configure("Header.TButton.Borderless.Round", background=self.header) @@ -201,26 +201,18 @@ class CustomFileDialog(tk.Toplevel): style.map("Header.TButton.Borderless.Round", background=[ ('active', self.hover_extrastyle)]) - # Symmetrical padding and no border should help with consistent look and hover style.configure("Dark.TButton.Borderless", anchor="w", - background=self.sidebar_color, foreground=self.color_foreground, - padding=(10, 5, 10, 5), borderwidth=0, relief="flat") + background=self.sidebar_color, foreground=self.color_foreground, padding=(20, 5, 0, 5)) style.map("Dark.TButton.Borderless", background=[ ('active', self.hover_extrastyle2)]) style.configure("Accent.TFrame", background=self.header) style.configure("Accent.TLabel", background=self.header) - + style.configure("AccentBottom.TFrame", background=self.bottom_color) + style.configure("AccentBottom.TLabel", background=self.bottom_color) style.configure("Sidebar.TFrame", background=self.sidebar_color) - # Style for Combobox to control height via padding - style.configure("TCombobox", padding=(0, 4, 0, 4), width=15) - style.map("TCombobox", fieldbackground=[('readonly', self.header if not is_dark else self.icon_bg_color)]) - style.map("TCombobox", selectbackground=[('readonly', self.header if not is_dark else self.icon_bg_color)]) - style.map("TCombobox", selectforeground=[('readonly', self.color_foreground)]) - - style.configure("Content.TFrame", background=self.icon_bg_color) style.configure("Item.TFrame", background=self.icon_bg_color) style.map('Item.TFrame', background=[ @@ -340,12 +332,10 @@ class CustomFileDialog(tk.Toplevel): compound="left", command=lambda p=config['path']: self.navigate_to(p), style="Dark.TButton.Borderless") btn.pack(fill="x", pady=1) - ttk.Separator(sidebar_buttons_frame, orient='horizontal').pack(fill='x', pady=10, padx=20) - storage_frame = ttk.Frame(sidebar_frame, style="Sidebar.TFrame") storage_frame.grid(row=1, column=0, sticky="ew", padx=10) self.storage_label = ttk.Label( - storage_frame, text="Freier Speicher:") + storage_frame, text="Freier Speicher:", background=self.freespace_background) self.storage_label.pack(fill="x", padx=10) self.storage_bar = ttk.Progressbar( storage_frame, orient="horizontal", length=100, mode="determinate") @@ -380,7 +370,7 @@ class CustomFileDialog(tk.Toplevel): command=self.on_cancel).grid(row=1, column=0, padx=10) self.filter_combobox = ttk.Combobox( - bottom_controls_frame, values=[ft[0] for ft in self.filetypes], state="readonly") + bottom_controls_frame, values=[ft[0] for ft in self.filetypes], state="readonly", width=20) self.filter_combobox.grid( row=1, column=1, sticky="w", padx=10, pady=(5, 10)) self.filter_combobox.bind( diff --git a/mainwindow.py b/mainwindow.py index 1bd756d..0610908 100644 --- a/mainwindow.py +++ b/mainwindow.py @@ -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()