mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 15:35:03 +02:00
Use less contrasting color for powerline alt separator
This change makes it so that when using powerline-style tab bars, and if the `tab_bar_background`, `inactive_tab_background` and `inactive_tab_foreground` are all different, the separator between inactive tabs uses the less contrasting color between the inactive foreground, and the tab bar background. This fixes #3664.
This commit is contained in:
@@ -234,6 +234,15 @@ def draw_tab_with_powerline(draw_data: DrawData, screen: Screen, tab: TabBarData
|
||||
screen.cursor.bg = inactive_bg
|
||||
screen.draw(separator_symbol)
|
||||
else:
|
||||
if tab_bg == default_bg:
|
||||
pass
|
||||
elif tab_bg == tab_fg:
|
||||
screen.cursor.fg = default_bg
|
||||
else:
|
||||
c1 = draw_data.inactive_bg.contrast(draw_data.default_bg)
|
||||
c2 = draw_data.inactive_bg.contrast(draw_data.inactive_fg)
|
||||
if c1 < c2:
|
||||
screen.cursor.fg = default_bg
|
||||
screen.draw(f' {separator_alt_symbol}')
|
||||
|
||||
end = screen.cursor.x
|
||||
|
||||
Reference in New Issue
Block a user