Enhanced player stability and added exit confirmation
- Fixed VLC display errors by implementing PIL fallback for images - Added comprehensive timer management with individual error handling - Implemented watchdog timers to prevent freezing during media transitions - Enhanced exit functionality with quickconnect code confirmation dialog - Improved settings window behavior with proper modal focus - Added transition protection to prevent rapid media cycling - Enhanced error handling throughout the application - Fixed controls window cleanup and destruction process
This commit is contained in:
@@ -12,13 +12,33 @@ class AppSettingsWindow(tk.Tk):
|
||||
self.geometry('440x600') # Increased height for better button visibility
|
||||
self.resizable(False, False)
|
||||
self.config(bg='#23272e')
|
||||
|
||||
# Ensure window appears on top and gets focus
|
||||
self.attributes('-topmost', True)
|
||||
self.lift()
|
||||
self.focus_force()
|
||||
self.grab_set() # Make window modal
|
||||
|
||||
# Center the window on screen
|
||||
self.center_window()
|
||||
|
||||
self.fields = {}
|
||||
self.load_config()
|
||||
self.style = ttk.Style(self)
|
||||
self.set_styles()
|
||||
self.create_widgets()
|
||||
|
||||
# Ensure focus after widgets are created
|
||||
self.after(100, self.focus_force)
|
||||
|
||||
def center_window(self):
|
||||
"""Center the settings window on the screen"""
|
||||
self.update_idletasks()
|
||||
width = self.winfo_width()
|
||||
height = self.winfo_height()
|
||||
x = (self.winfo_screenwidth() // 2) - (width // 2)
|
||||
y = (self.winfo_screenheight() // 2) - (height // 2)
|
||||
self.geometry(f'{width}x{height}+{x}+{y}')
|
||||
|
||||
def set_styles(self):
|
||||
self.style.theme_use('clam')
|
||||
|
||||
Reference in New Issue
Block a user