mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-13 12:09:35 +03:00
Fix kitty @set-colors not working for tab backgrounds when using the fade
tabbar style
Fixes #937
This commit is contained in:
parent
b9b38a4ec1
commit
5f6e21da9b
@ -36,6 +36,9 @@ Changelog
|
||||
- Revert change for backspacing of wide characters in the previous release,
|
||||
as it breaks backspacing in some wide character aware programs (:iss:`875`)
|
||||
|
||||
- Fix kitty @set-colors not working for tab backgrounds when using the `fade` tabbar style
|
||||
(:iss:`937`)
|
||||
|
||||
|
||||
0.12.1 [2018-09-08]
|
||||
------------------------------
|
||||
|
@ -13,7 +13,7 @@ from .fast_data_types import (
|
||||
from .layout import Rect
|
||||
from .utils import color_as_int
|
||||
from .window import calculate_gl_geometry
|
||||
from .rgb import alpha_blend
|
||||
from .rgb import alpha_blend, color_from_int
|
||||
|
||||
TabBarData = namedtuple('TabBarData', 'title is_active needs_attention')
|
||||
DrawData = namedtuple('DrawData', 'leading_spaces sep trailing_spaces bell_on_tab bell_fg alpha active_bg inactive_bg default_bg')
|
||||
@ -121,6 +121,11 @@ class TabBar:
|
||||
self.active_fg = (spec['active_tab_foreground'] << 8) | 2
|
||||
if 'active_tab_background' in spec:
|
||||
self.active_bg = (spec['active_tab_background'] << 8) | 2
|
||||
self.draw_data = self.draw_data._replace(active_bg=color_from_int(spec['active_tab_background']))
|
||||
if 'inactive_tab_background' in spec:
|
||||
self.draw_data = self.draw_data._replace(inactive_bg=color_from_int(spec['inactive_tab_background']))
|
||||
if 'background' in spec:
|
||||
self.draw_data = self.draw_data._replace(default_bg=color_from_int(spec['background']))
|
||||
self.screen.color_profile.set_configured_colors(
|
||||
spec.get('inactive_tab_foreground', color_as_int(self.opts.inactive_tab_foreground)),
|
||||
spec.get('inactive_tab_background', color_as_int(self.opts.inactive_tab_background))
|
||||
|
Loading…
Reference in New Issue
Block a user