fix: Fix Translate Output unlock and status text overflow
Translate Output State Fix: - Keep "Translate Output" disabled after stopping if "Translate Only (1:1)" is selected - Updated unlock_ui_controls() to check translate_only state - Prevents enabling both Translate Output and Translate Only simultaneously - Enforces mutual exclusivity between the two translation modes Status Label Overflow Fix: - Increased wraplength from 330 to 340 pixels for status labels - Added horizontal padding (padx=5) for better text spacing - Applied to both main status_label and tts_status_label - Prevents text cutoff when showing AI model information - Improves readability with better word wrapping These changes ensure the UI maintains proper state consistency after stop/start cycles and provides better visual presentation of status messages.
+12 −6 · 1 file changed
-
src/gui.py+12 −6
@@ -568,8 +568,8 @@ class App(tk.Tk): # TTS status self.tts_status_label = ttk.Label(self.controls_frame, text="", foreground="blue", - wraplength=330, font=('TkDefaultFont', 8)) - self.tts_status_label.grid(row=row, column=0, sticky="ew", pady=(0, 5)) + wraplength=340, font=('TkDefaultFont', 8)) + self.tts_status_label.grid(row=row, column=0, sticky="ew", pady=(0, 5), padx=5) row += 1 # === CONTROL BUTTON & LEVEL === @@ -600,8 +600,8 @@ class App(tk.Tk): ttk.Label(autostop_frame, text="min of inactivity").pack(side="left") # === STATUS === - self.status_label = ttk.Label(self.controls_frame, text="", foreground="red", wraplength=330) - self.status_label.grid(row=row, column=0, sticky="ew") + self.status_label = ttk.Label(self.controls_frame, text="", foreground="red", wraplength=340) + self.status_label.grid(row=row, column=0, sticky="ew", padx=5) row += 1 # State variables @@ -1496,10 +1496,16 @@ class App(tk.Tk): # Re-enable based on current state translate_only = "selected" in self.ai_translate_only_check.state() self.ai_translate_only_check.state(("!disabled",)) - self.ai_translate_check.state(("!disabled",)) + + # If Translate Only is selected, keep Translate Output disabled + if translate_only: + self.ai_translate_check.state(("disabled",)) + else: + self.ai_translate_check.state(("!disabled",)) + self.ai_manual_mode_check.state(("!disabled",)) - # Re-apply translate-only logic for task and translate output + # Re-apply translate-only logic for task combo if translate_only: self.ai_persona_combo.state(("disabled",)) else: