When drawing the tab bar have the default left and right margins drawn in a color matching the neighboring tab
Fixes #5719
This commit is contained in:
parent
3cbca4955e
commit
fda4aa21a1
@ -59,6 +59,8 @@ Detailed list of changes
|
||||
|
||||
- A new option :opt:`tab_title_max_length` to limit the length of tab (:iss:`5718`)
|
||||
|
||||
- When drawing the tab bar have the default left and right margins drawn in a color matching the neighboring tab (:iss:`5719`)
|
||||
|
||||
|
||||
0.26.5 [2022-11-07]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -1248,7 +1248,8 @@ opt('tab_bar_margin_color', 'none',
|
||||
option_type='to_color_or_none', ctype='color_or_none_as_int',
|
||||
long_text='''
|
||||
Color for the tab bar margin area. Defaults to using the terminal background
|
||||
color.
|
||||
color for margins above and below the tab bar. For side margins the default color
|
||||
is chosen to match the background color of the neighboring tab.
|
||||
'''
|
||||
)
|
||||
egr() # }}}
|
||||
|
||||
@ -575,10 +575,14 @@ class TabBar:
|
||||
if opts.tab_bar_margin_height.inner:
|
||||
blank_rects.append(Border(0, tab_bar.bottom + 1, vw, central.top, bg))
|
||||
g = self.window_geometry
|
||||
left_bg = right_bg = bg
|
||||
if opts.tab_bar_margin_color is None:
|
||||
left_bg = BorderColor.tab_bar_left_edge_color
|
||||
right_bg = BorderColor.tab_bar_right_edge_color
|
||||
if g.left > 0:
|
||||
blank_rects.append(Border(0, g.top, g.left, g.bottom + 1, bg))
|
||||
blank_rects.append(Border(0, g.top, g.left, g.bottom + 1, left_bg))
|
||||
if g.right - 1 < vw:
|
||||
blank_rects.append(Border(g.right - 1, g.top, vw, g.bottom + 1, bg))
|
||||
blank_rects.append(Border(g.right - 1, g.top, vw, g.bottom + 1, right_bg))
|
||||
self.blank_rects = tuple(blank_rects)
|
||||
|
||||
def layout(self) -> None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user