From ac2b1fbe0b7d2cbd35fca71e4e3fd4b03c3569d5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Mar 2025 11:10:03 +0530 Subject: [PATCH] Fix a regression that caused tab bar margins to not be properly blanked when the tab bar is at the bottom Fixes #8494 --- docs/changelog.rst | 3 +++ kitty/tab_bar.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index f4fa08705..7116260f0 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -100,6 +100,9 @@ Detailed list of changes - Fix a regression in the previous release that caused rendering of emoji using the VS16 variation selector to fail with some fonts (:iss:`8495`) +- Fix a regression that caused tab bar margins to not be properly blanked when + the tab bar is at the bottom (:iss:`8494`) + 0.41.0 [2025-03-29] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index d3acbe630..0c2c9970a 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -14,8 +14,8 @@ from typing import ( from .borders import Border, BorderColor from .constants import config_dir from .fast_data_types import ( + BOTTOM_EDGE, DECAWM, - TOP_EDGE, Color, Region, Screen, @@ -552,7 +552,7 @@ class TabBar: opts.active_tab_title_template, opts.tab_activity_symbol, opts.tab_powerline_style, - 'top' if opts.tab_bar_edge == TOP_EDGE else 'bottom', + 'bottom' if opts.tab_bar_edge == BOTTOM_EDGE else 'top', opts.tab_title_max_length, ) ts = opts.tab_bar_style @@ -624,12 +624,12 @@ class TabBar: blank_rects: list[Border] = [] bg = BorderColor.tab_bar_margin_color if opts.tab_bar_margin_color is not None else BorderColor.default_bg if opts.tab_bar_margin_height: - if opts.tab_bar_edge == 3: # bottom + if opts.tab_bar_edge == BOTTOM_EDGE: if opts.tab_bar_margin_height.outer: blank_rects.append(Border(0, tab_bar.bottom + 1, vw, vh, bg)) if opts.tab_bar_margin_height.inner: blank_rects.append(Border(0, central.bottom + 1, vw, vh, bg)) - else: # top + else: # top if opts.tab_bar_margin_height.outer: blank_rects.append(Border(0, 0, vw, tab_bar.top, bg)) if opts.tab_bar_margin_height.inner: