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:
Kovid Goyal
2022-12-04 20:51:41 +05:30
parent 3cbca4955e
commit fda4aa21a1
3 changed files with 10 additions and 3 deletions

View File

@@ -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: