Deprecate the adjust_baseline adjust_line_height and adjust_column_width options in favor of modify_font

Unifies handling and allow using pt units for those adjustments.
Note that the behavior of percentage sizes for adjust baseline is
backwards incompatible. It now uses the baseline value as the base
rather than the cell height.
This commit is contained in:
Kovid Goyal
2022-07-15 15:29:42 +05:30
parent a02e07bfe8
commit 32588939ae
12 changed files with 68 additions and 174 deletions
+13 -13
View File
@@ -6,10 +6,10 @@ from kitty.conf.utils import (
unit_float
)
from kitty.options.utils import (
action_alias, active_tab_title_template, adjust_baseline, adjust_line_height, allow_hyperlinks,
allow_remote_control, bell_on_tab, box_drawing_scale, clear_all_mouse_actions, clear_all_shortcuts,
clipboard_control, clone_source_strategies, config_or_absolute_path, copy_on_select,
cursor_text_color, deprecated_hide_window_decorations_aliases,
action_alias, active_tab_title_template, allow_hyperlinks, allow_remote_control, bell_on_tab,
box_drawing_scale, clear_all_mouse_actions, clear_all_shortcuts, clipboard_control,
clone_source_strategies, config_or_absolute_path, copy_on_select, cursor_text_color,
deprecated_adjust_line_height, deprecated_hide_window_decorations_aliases,
deprecated_macos_show_window_title_in_menubar_alias, deprecated_send_text, disable_ligatures,
edge_width, env, font_features, hide_window_decorations, macos_option_as_alt, macos_titlebar_color,
modify_font, narrow_symbols, optional_edge_width, parse_map, parse_mouse_map, paste_actions,
@@ -42,15 +42,6 @@ class Parser:
def active_tab_title_template(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['active_tab_title_template'] = active_tab_title_template(val)
def adjust_baseline(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['adjust_baseline'] = adjust_baseline(val)
def adjust_column_width(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['adjust_column_width'] = adjust_line_height(val)
def adjust_line_height(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
ans['adjust_line_height'] = adjust_line_height(val)
def allow_cloning(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
val = val.lower()
if val not in self.choices_for_allow_cloning:
@@ -1352,6 +1343,15 @@ class Parser:
def send_text(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
deprecated_send_text('send_text', val, ans)
def adjust_line_height(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
deprecated_adjust_line_height('adjust_line_height', val, ans)
def adjust_column_width(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
deprecated_adjust_line_height('adjust_column_width', val, ans)
def adjust_baseline(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
deprecated_adjust_line_height('adjust_baseline', val, ans)
def map(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
for k in parse_map(val):
ans['map'].append(k)