Skip to content

Commit

Permalink
Fix border colors not being changed by auto light/dark themes at startup
Browse files Browse the repository at this point in the history
Fixes #8180
  • Loading branch information
kovidgoyal committed Dec 31, 2024
1 parent 37c3bbc commit f13ee32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions kitty/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,19 @@ def patch_opts(self, opts: Options, debug_rendering: bool = False) -> None:
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
Expand Down

0 comments on commit f13ee32

Please sign in to comment.