Create the Settings tab with basic and advanced settings.
(self)
| 600 | self.account_detail.pack(anchor="w", padx=20, pady=(0, 15)) |
| 601 | |
| 602 | def _create_settings_tab(self): |
| 603 | """Create the Settings tab with basic and advanced settings.""" |
| 604 | tab = self.tabview.tab(get_text("tab_settings")) |
| 605 | tab.grid_columnconfigure(0, weight=1) |
| 606 | tab.grid_rowconfigure(0, weight=1) |
| 607 | |
| 608 | # Create scrollable container for all settings |
| 609 | settings_scroll = ctk.CTkScrollableFrame( |
| 610 | tab, |
| 611 | fg_color=COLORS["bg_dark"], |
| 612 | scrollbar_fg_color=COLORS["bg_medium"], |
| 613 | scrollbar_button_color=COLORS["border"], |
| 614 | scrollbar_button_hover_color=COLORS["accent"], |
| 615 | ) |
| 616 | settings_scroll.grid(row=0, column=0, sticky="nsew", padx=5, pady=5) |
| 617 | settings_scroll.grid_columnconfigure(0, weight=1) |
| 618 | |
| 619 | # Store reference for scroll binding |
| 620 | self._settings_scroll = settings_scroll |
| 621 | |
| 622 | # Port settings card |
| 623 | port_card = ctk.CTkFrame( |
| 624 | settings_scroll, |
| 625 | fg_color=COLORS["bg_medium"], |
| 626 | corner_radius=DIMENSIONS["corner_radius"], |
| 627 | ) |
| 628 | port_card.grid(row=0, column=0, sticky="ew", padx=5, pady=(5, 10)) |
| 629 | |
| 630 | ctk.CTkLabel( |
| 631 | port_card, |
| 632 | text=get_text("port_settings"), |
| 633 | font=ctk.CTkFont(size=FONTS["size_large"], weight="bold"), |
| 634 | text_color=COLORS["accent"], |
| 635 | ).grid(row=0, column=0, columnspan=4, sticky="w", padx=20, pady=(15, 10)) |
| 636 | |
| 637 | ctk.CTkLabel( |
| 638 | port_card, |
| 639 | text=get_text("fastapi_port"), |
| 640 | text_color=COLORS["text_primary"], |
| 641 | ).grid(row=1, column=0, sticky="w", padx=(20, 10), pady=10) |
| 642 | fastapi_entry = ctk.CTkEntry( |
| 643 | port_card, |
| 644 | textvariable=self.fastapi_port, |
| 645 | width=120, |
| 646 | height=38, |
| 647 | text_color=COLORS["text_primary"], |
| 648 | ) |
| 649 | fastapi_entry.grid(row=1, column=1, sticky="w", padx=10, pady=10) |
| 650 | CTkTooltip(fastapi_entry, "tooltip_fastapi_port") |
| 651 | |
| 652 | ctk.CTkLabel( |
| 653 | port_card, |
| 654 | text=get_text("stream_port"), |
| 655 | text_color=COLORS["text_primary"], |
| 656 | ).grid(row=1, column=2, sticky="w", padx=(30, 10), pady=10) |
| 657 | stream_entry = ctk.CTkEntry( |
| 658 | port_card, |
| 659 | textvariable=self.stream_port, |
no test coverage detected