✨ feat: add scrollbar via CTkScrollableFrame for window resize
- Replace main_frame CTkFrame → CTkScrollableFrame for vertical scrollbar - Remove main_frame.grid_rowconfigure weight — content natural height - Remove right_frame.grid_rowconfigure weight — prevents squashing - Left column (workflow + log) retains weight=1 for dominant width - Right column (config/serial/utility/status) keeps natural narrow width
This commit is contained in:
@@ -265,10 +265,9 @@ class MainWindow(ctk.CTk):
|
||||
|
||||
def _build_ui(self) -> None:
|
||||
"""Build the complete UI layout."""
|
||||
# Main container with padding
|
||||
main_frame = ctk.CTkFrame(self)
|
||||
# Scrollable main container — scrollbar appears when content overflows
|
||||
main_frame = ctk.CTkScrollableFrame(self)
|
||||
main_frame.pack(fill="both", expand=True, padx=PADDING_LARGE, pady=PADDING_LARGE)
|
||||
main_frame.grid_rowconfigure(1, weight=1)
|
||||
main_frame.grid_columnconfigure(0, weight=1)
|
||||
|
||||
# ── Header ──
|
||||
@@ -286,7 +285,6 @@ class MainWindow(ctk.CTk):
|
||||
# ── Right Panel: Configuration ──
|
||||
right_frame = ctk.CTkFrame(main_frame)
|
||||
right_frame.grid(row=1, column=1, sticky="nsew", padx=(PADDING, 0))
|
||||
right_frame.grid_rowconfigure(3, weight=1)
|
||||
right_frame.grid_columnconfigure(0, weight=1)
|
||||
|
||||
self._build_config_panel(right_frame)
|
||||
|
||||
Reference in New Issue
Block a user