mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix a regression that caused automatic color themes to not be re-applied after config file reload
The reload was only happening if the auto theme config file had its mtime updated, since the last time it was checked. Fixes #8530
This commit is contained in:
@@ -101,6 +101,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- diff kitten: Add half page and full page scroll vim-like bindings (:pull:`8514`)
|
- diff kitten: Add half page and full page scroll vim-like bindings (:pull:`8514`)
|
||||||
|
|
||||||
|
- Fix a regression that caused automatic color themes to not be re-applied after config file reload (:iss:`8530`)
|
||||||
|
|
||||||
0.41.1 [2025-04-03]
|
0.41.1 [2025-04-03]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -2695,7 +2695,9 @@ class Boss:
|
|||||||
for tm in self.all_tab_managers:
|
for tm in self.all_tab_managers:
|
||||||
tm.apply_options()
|
tm.apply_options()
|
||||||
# Update colors
|
# Update colors
|
||||||
if theme_colors.applied_theme and theme_colors.refresh():
|
if theme_colors.has_applied_theme:
|
||||||
|
theme_colors.refresh()
|
||||||
|
if theme_colors.has_applied_theme: # in case the theme file was deleted
|
||||||
theme_colors.apply_theme(theme_colors.applied_theme, notify_on_bg_change=False)
|
theme_colors.apply_theme(theme_colors.applied_theme, notify_on_bg_change=False)
|
||||||
for w in self.all_windows:
|
for w in self.all_windows:
|
||||||
if w.screen.color_profile.default_bg != bg_colors_before.get(w.id):
|
if w.screen.color_profile.default_bg != bg_colors_before.get(w.id):
|
||||||
|
|||||||
@@ -83,6 +83,18 @@ class ThemeColors:
|
|||||||
found = True
|
found = True
|
||||||
return found
|
return found
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_applied_theme(self) -> bool:
|
||||||
|
match self.applied_theme:
|
||||||
|
case '':
|
||||||
|
return False
|
||||||
|
case 'dark':
|
||||||
|
return self.has_dark_theme
|
||||||
|
case 'light':
|
||||||
|
return self.has_light_theme
|
||||||
|
case 'no_preference':
|
||||||
|
return self.has_no_preference_theme
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_dark_theme(self) -> bool:
|
def has_dark_theme(self) -> bool:
|
||||||
return self.dark_mtime > -1
|
return self.dark_mtime > -1
|
||||||
|
|||||||
Reference in New Issue
Block a user