mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 09:48:09 +02:00
Fix #8288
This commit is contained in:
@@ -307,6 +307,8 @@ WINDOW_FULLSCREEN: int
|
|||||||
WINDOW_MAXIMIZED: int
|
WINDOW_MAXIMIZED: int
|
||||||
WINDOW_MINIMIZED: int
|
WINDOW_MINIMIZED: int
|
||||||
TEXT_SIZE_CODE: int
|
TEXT_SIZE_CODE: int
|
||||||
|
TOP_EDGE: int
|
||||||
|
BOTTOM_EDGE: int
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ def tab_separator(x: str) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def tab_bar_edge(x: str) -> int:
|
def tab_bar_edge(x: str) -> int:
|
||||||
return {'top': 1, 'bottom': 3}.get(x.lower(), 3)
|
return {'top': defines.TOP_EDGE, 'bottom': defines.BOTTOM_EDGE}.get(x.lower(), 3)
|
||||||
|
|
||||||
|
|
||||||
def tab_font_style(x: str) -> tuple[bool, bool]:
|
def tab_font_style(x: str) -> tuple[bool, bool]:
|
||||||
|
|||||||
@@ -1548,6 +1548,8 @@ init_state(PyObject *module) {
|
|||||||
PyModule_AddIntMacro(module, WINDOW_FULLSCREEN);
|
PyModule_AddIntMacro(module, WINDOW_FULLSCREEN);
|
||||||
PyModule_AddIntMacro(module, WINDOW_MAXIMIZED);
|
PyModule_AddIntMacro(module, WINDOW_MAXIMIZED);
|
||||||
PyModule_AddIntMacro(module, WINDOW_MINIMIZED);
|
PyModule_AddIntMacro(module, WINDOW_MINIMIZED);
|
||||||
|
PyModule_AddIntMacro(module, TOP_EDGE);
|
||||||
|
PyModule_AddIntMacro(module, BOTTOM_EDGE);
|
||||||
register_at_exit_cleanup_func(STATE_CLEANUP_FUNC, finalize);
|
register_at_exit_cleanup_func(STATE_CLEANUP_FUNC, finalize);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ from .borders import Border, BorderColor
|
|||||||
from .constants import config_dir
|
from .constants import config_dir
|
||||||
from .fast_data_types import (
|
from .fast_data_types import (
|
||||||
DECAWM,
|
DECAWM,
|
||||||
|
TOP_EDGE,
|
||||||
Color,
|
Color,
|
||||||
Region,
|
Region,
|
||||||
Screen,
|
Screen,
|
||||||
@@ -551,7 +552,7 @@ class TabBar:
|
|||||||
opts.active_tab_title_template,
|
opts.active_tab_title_template,
|
||||||
opts.tab_activity_symbol,
|
opts.tab_activity_symbol,
|
||||||
opts.tab_powerline_style,
|
opts.tab_powerline_style,
|
||||||
'top' if opts.tab_bar_edge == 1 else 'bottom',
|
'top' if opts.tab_bar_edge == TOP_EDGE else 'bottom',
|
||||||
opts.tab_title_max_length,
|
opts.tab_title_max_length,
|
||||||
)
|
)
|
||||||
ts = opts.tab_bar_style
|
ts = opts.tab_bar_style
|
||||||
|
|||||||
Reference in New Issue
Block a user