Create the Control tab.
(self)
| 276 | self._create_logs_tab() |
| 277 | |
| 278 | def _create_control_tab(self): |
| 279 | """Create the Control tab.""" |
| 280 | tab = self.tabview.tab(get_text("tab_control")) |
| 281 | tab.grid_columnconfigure(0, weight=1) |
| 282 | |
| 283 | # Quick Start Card |
| 284 | quick_card = ctk.CTkFrame( |
| 285 | tab, |
| 286 | fg_color=COLORS["bg_medium"], |
| 287 | corner_radius=DIMENSIONS["corner_radius"], |
| 288 | ) |
| 289 | quick_card.grid(row=0, column=0, sticky="ew", pady=(10, 15), padx=10) |
| 290 | quick_card.grid_columnconfigure(1, weight=1) |
| 291 | |
| 292 | # Card header |
| 293 | ctk.CTkLabel( |
| 294 | quick_card, |
| 295 | text=get_text("quick_start"), |
| 296 | font=ctk.CTkFont(size=FONTS["size_large"], weight="bold"), |
| 297 | text_color=COLORS["accent"], |
| 298 | ).grid(row=0, column=0, columnspan=4, sticky="w", padx=20, pady=(15, 10)) |
| 299 | |
| 300 | # Account selector |
| 301 | ctk.CTkLabel( |
| 302 | quick_card, |
| 303 | text=get_text("account_label"), |
| 304 | font=ctk.CTkFont(size=FONTS["size_normal"]), |
| 305 | text_color=COLORS["text_primary"], |
| 306 | ).grid(row=1, column=0, sticky="w", padx=(20, 10), pady=10) |
| 307 | |
| 308 | self.account_combo = ctk.CTkComboBox( |
| 309 | quick_card, |
| 310 | variable=self.selected_account, |
| 311 | width=250, |
| 312 | height=38, |
| 313 | corner_radius=DIMENSIONS["corner_radius_small"], |
| 314 | fg_color=COLORS["bg_light"], |
| 315 | border_color=COLORS["border"], |
| 316 | button_color=COLORS["accent"], |
| 317 | button_hover_color=COLORS["accent_hover"], |
| 318 | dropdown_fg_color=COLORS["bg_medium"], |
| 319 | dropdown_hover_color=COLORS["bg_light"], |
| 320 | text_color=COLORS["text_primary"], |
| 321 | dropdown_text_color=COLORS["text_primary"], |
| 322 | ) |
| 323 | self.account_combo.grid(row=1, column=1, sticky="w", padx=10, pady=10) |
| 324 | CTkTooltip(self.account_combo, "tooltip_account") |
| 325 | |
| 326 | # Mode selector |
| 327 | ctk.CTkLabel( |
| 328 | quick_card, |
| 329 | text=get_text("mode_label"), |
| 330 | font=ctk.CTkFont(size=FONTS["size_normal"]), |
| 331 | text_color=COLORS["text_primary"], |
| 332 | ).grid(row=1, column=2, sticky="w", padx=(30, 10), pady=10) |
| 333 | |
| 334 | mode_frame = ctk.CTkFrame(quick_card, fg_color="transparent") |
| 335 | mode_frame.grid(row=1, column=3, sticky="w", padx=(0, 20), pady=10) |
no test coverage detected