Fix border colors not being changed by auto light/dark themes at startup

Fixes #8180
This commit is contained in:
Kovid Goyal 2024-12-31 12:28:16 +05:30
parent 37c3bbc684
commit f13ee32c3c
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 0 deletions

View file

@ -88,6 +88,8 @@ Detailed list of changes
- When mapping a custom kitten allow using shell escaping for the kitten path (:iss:`8178`)
- Fix border colors not being changed by auto light/dark themes at startup (:iss:`8180`)
0.38.1 [2024-12-26]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -103,16 +103,19 @@ class ThemeColors:
log_error('Current system color scheme:', which)
if which == 'dark' and self.has_dark_theme:
patch_options_with_color_spec(opts, self.dark_spec, self.dark_tbc)
patch_global_colors(self.dark_spec, True)
if debug_rendering:
log_error(f'Applied {which} color theme')
self.applied_theme = which
elif which == 'light' and self.has_light_theme:
patch_options_with_color_spec(opts, self.light_spec, self.light_tbc)
patch_global_colors(self.dark_spec, True)
if debug_rendering:
log_error(f'Applied {which} color theme')
self.applied_theme = which
elif which == 'no_preference' and self.has_no_preference_theme:
patch_options_with_color_spec(opts, self.no_preference_spec, self.no_preference_tbc)
patch_global_colors(self.dark_spec, True)
if debug_rendering:
log_error(f'Applied {which} color theme')
self.applied_theme = which