@@ -199,12 +199,21 @@ def __apply_theme(self, theme_color: str):
199199 """Apply a theme to the UI."""
200200 theme_colors_dict = self .theme .light if theme_color == "light" else self .theme .dark
201201 self .root .configure (background = theme_colors_dict ["widget_bg" ])
202- for widget in self .__find_all_widgets (self .root , tkinter .Text ):
203- widget .configure (
204- background = theme_colors_dict ["pane_bg" ],
205- foreground = theme_colors_dict ["text" ],
206- font = self .theme .default_font ,
207- )
202+ for widget in self .__find_all_widgets (self .root , (tkinter .Text , tkinter .Listbox , tkinter .Scrollbar )):
203+ if isinstance (widget , tkinter .Text ):
204+ widget .configure (
205+ background = theme_colors_dict ["pane_bg" ],
206+ foreground = theme_colors_dict ["text" ],
207+ font = self .theme .default_font ,
208+ )
209+ elif isinstance (widget , tkinter .Listbox ):
210+ widget .configure (
211+ background = theme_colors_dict ["widget_bg" ],
212+ foreground = theme_colors_dict ["text" ],
213+ font = self .theme .default_font ,
214+ )
215+ else :
216+ widget .configure (background = self .theme .light ["widget_bg" ])
208217
209218 button_text = None
210219 if theme_color == "light" :
0 commit comments