feat(ui): Adjust button layout for open/save modes
Modified the button layout methods to place the primary action button (Open/Save) at the top and the Cancel button at the bottom of their respective containers. This creates a more consistent and predictable user experience across all dialog modes and view settings.
This commit is contained in:
@@ -388,41 +388,42 @@ class WidgetManager:
|
||||
self._layout_open_buttons_right()
|
||||
|
||||
def _layout_save_buttons_left(self):
|
||||
self.save_button.pack(in_=self.left_container, side="left", padx=(0, 5))
|
||||
self.cancel_button.pack(in_=self.left_container, side="left")
|
||||
self.left_container.grid_rowconfigure(1, weight=1)
|
||||
self.save_button.pack(in_=self.left_container, side="top", pady=(0, 5))
|
||||
self.cancel_button.pack(in_=self.left_container, side="bottom")
|
||||
|
||||
self.filter_combobox.pack(in_=self.center_container, side="left", pady=(5,0), padx=(5,0))
|
||||
self.search_status_label.pack(in_=self.center_container, side="left", pady=(5,0), padx=(5,0))
|
||||
self.trash_button.pack(in_=self.right_container, side="right", padx=(5,0))
|
||||
self.settings_button.pack(in_=self.right_container, side="right")
|
||||
|
||||
def _layout_save_buttons_right(self):
|
||||
self.right_container.grid_rowconfigure(1, weight=1)
|
||||
self.save_button.pack(in_=self.right_container, side="top", pady=(0, 5))
|
||||
self.cancel_button.pack(in_=self.right_container, side="bottom")
|
||||
|
||||
self.trash_button.pack(in_=self.left_container, side="left")
|
||||
self.search_status_label.pack(in_=self.center_container, side="left", pady=(5,0), padx=(5,0))
|
||||
self.filter_combobox.pack(in_=self.center_container, side="right", pady=(5,0), padx=(0,5))
|
||||
self.save_button.pack(in_=self.right_container, side="left", padx=(5, 5))
|
||||
self.cancel_button.pack(in_=self.right_container, side="left")
|
||||
self.settings_button.pack(in_=self.right_container, side="right")
|
||||
|
||||
def _layout_open_buttons_left(self):
|
||||
self.open_button.pack(in_=self.left_container, side="left", padx=(0, 5))
|
||||
self.cancel_button.pack(in_=self.left_container, side="left")
|
||||
self.left_container.grid_rowconfigure(1, weight=1)
|
||||
self.open_button.pack(in_=self.left_container, side="top", pady=(0, 5))
|
||||
self.cancel_button.pack(in_=self.left_container, side="bottom")
|
||||
|
||||
self.filter_combobox.pack(in_=self.center_container, side="left", pady=(5,0), padx=(5,0))
|
||||
self.search_status_label.pack(in_=self.center_container, side="left", pady=(5,0), padx=(5,0))
|
||||
self.settings_button.pack(in_=self.right_container, side="right")
|
||||
|
||||
def _layout_open_buttons_right(self):
|
||||
# Corrected layout: search status left, filter combobox right
|
||||
self.right_container.grid_rowconfigure(1, weight=1)
|
||||
self.open_button.pack(in_=self.right_container, side="top", pady=(0, 5))
|
||||
self.cancel_button.pack(in_=self.right_container, side="bottom")
|
||||
|
||||
self.search_status_label.pack(in_=self.center_container, side="left", pady=(5,0), padx=(5,0))
|
||||
self.filter_combobox.pack(in_=self.center_container, side="right", pady=(5,0), padx=(0,5))
|
||||
|
||||
# Corrected button layout
|
||||
self.trash_button.pack(in_=self.left_container, side="bottom", pady=(0, 5))
|
||||
|
||||
action_button_frame = ttk.Frame(self.right_container, style="AccentBottom.TFrame")
|
||||
action_button_frame.pack(side="bottom", anchor="se")
|
||||
|
||||
self.open_button.pack(in_=action_button_frame, side="left", padx=(0, 5))
|
||||
self.cancel_button.pack(in_=action_button_frame, side="left")
|
||||
self.settings_button.pack(in_=self.right_container, side="top", anchor="ne", pady=(0,5))
|
||||
|
||||
def setup_widgets(self):
|
||||
|
Reference in New Issue
Block a user