diff --git a/__pycache__/cfd_ui_setup.cpython-312.pyc b/__pycache__/cfd_ui_setup.cpython-312.pyc index fc29c24..245ded2 100644 Binary files a/__pycache__/cfd_ui_setup.cpython-312.pyc and b/__pycache__/cfd_ui_setup.cpython-312.pyc differ diff --git a/cfd_ui_setup.py b/cfd_ui_setup.py index cf59256..ece4360 100644 --- a/cfd_ui_setup.py +++ b/cfd_ui_setup.py @@ -341,10 +341,11 @@ class WidgetManager: self.right_container = ttk.Frame(self.action_status_frame, style="AccentBottom.TFrame") self.action_status_frame.grid_columnconfigure(1, weight=1) + self.action_status_frame.grid_rowconfigure(0, weight=1) - self.left_container.grid(row=0, column=0, sticky='w', pady=(10,0)) - self.center_container.grid(row=0, column=1, sticky='ew', pady=(10,0)) - self.right_container.grid(row=0, column=2, sticky='e', pady=(10,0)) + self.left_container.grid(row=0, column=0, sticky='nsw', pady=(5,0)) + self.center_container.grid(row=0, column=1, sticky='nsew', padx=5, pady=(5,0)) + self.right_container.grid(row=0, column=2, sticky='nse', pady=(5,0)) self.separator_color = "#a9a9a9" if self.style_manager.is_dark else "#7c7c7c" self.separator = tk.Frame(self.action_status_frame, height=1, bg=self.separator_color) self.separator.grid(row=1, column=0, columnspan=3, sticky="ew", pady=(4,0)) @@ -401,24 +402,27 @@ class WidgetManager: self.cancel_button.grid(in_=self.left_container, row=1, column=0) self.center_container.grid_columnconfigure(0, weight=1) - self.filter_combobox.grid(in_=self.center_container, row=1, column=1, pady=(5,0), padx=(5,0)) + self.filter_combobox.grid(in_=self.center_container, row=1, column=0, sticky="w", pady=(5,0)) self.search_status_label.grid(row=0, column=0, sticky="w", pady=(5,0), padx=(5,0)) self.right_container.grid_rowconfigure(0, weight=1) - self.trash_button.grid(in_=self.right_container, row=0, column=1, sticky="se", padx=(5,0)) self.settings_button.grid(in_=self.right_container, row=0, column=0, sticky="se") + self.trash_button.grid(in_=self.right_container, row=1, column=0, sticky="se", padx=(5,0)) def _layout_save_buttons_right(self): self.right_container.grid_rowconfigure(0, weight=1) - self.save_button.grid(in_=self.right_container, row=0, column=1, pady=(0, 5)) - self.cancel_button.grid(in_=self.right_container, row=1, column=1) - self.settings_button.grid(in_=self.right_container, row=0, column=0, sticky="se") + self.left_container.grid_rowconfigure(0, weight=1) + self.save_button.grid(in_=self.right_container, row=0, column=0, pady=(0, 5)) + self.cancel_button.grid(in_=self.right_container, row=1, column=0) + self.settings_button.grid(in_=self.right_container, row=0, column=1, sticky="se", padx=(5,0)) + self.left_container.grid_rowconfigure(0, weight=1) self.trash_button.grid(in_=self.left_container, row=0, column=0, sticky="sw") self.center_container.grid_columnconfigure(1, weight=1) - self.search_status_label.grid(row=1, column=0, sticky="w", pady=(5,0), padx=(5,0)) - self.filter_combobox.grid(in_=self.center_container, row=1, column=1, sticky="e", pady=(5,0), padx=(0,5)) + self.filter_combobox.grid(in_=self.center_container, row=1, column=1, sticky="e", pady=(5,0)) + self.search_status_label.grid(row=0, column=0, sticky="w", pady=(5,0), padx=(5,0)) + def _layout_open_buttons_left(self): self.left_container.grid_rowconfigure(0, weight=1) @@ -426,8 +430,8 @@ class WidgetManager: self.cancel_button.grid(in_=self.left_container, row=1, column=0) self.center_container.grid_columnconfigure(0, weight=1) - self.filter_combobox.grid(in_=self.center_container, row=0, column=1, sticky="e", pady=(5,0), padx=(5,0)) - self.search_status_label.grid(row=0, column=0, sticky="w", pady=(5,0), padx=(5,0)) + self.filter_combobox.grid(in_=self.center_container, row=0, column=0, sticky="e", pady=(5,0), padx=(5,0)) + self.search_status_label.grid(row=0, column=1, sticky="w", pady=(5,0), padx=(5,0)) self.right_container.grid_rowconfigure(0, weight=1) self.settings_button.grid(in_=self.right_container, row=0, column=0, sticky="se") diff --git a/mainwindow.py b/mainwindow.py index 690e400..c7d103a 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -33,7 +33,7 @@ class GlotzMol(tk.Tk): dialog = CustomFileDialog(self, initial_dir=os.path.expanduser("~"), filetypes=[("All Files", "*.*") - ], dialog_mode="save") + ]) # This is the crucial part: wait for the dialog to be closed self.wait_window(dialog)