mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 14:34:52 +02:00
@@ -245,10 +245,20 @@ add_borders_rect(id_type os_window_id, id_type tab_id, uint32_t left, uint32_t t
|
||||
void
|
||||
os_window_regions(OSWindow *os_window, Region *central, Region *tab_bar) {
|
||||
if (os_window->num_tabs > 1) {
|
||||
central->left = 0; central->top = 0; central->right = os_window->viewport_width - 1;
|
||||
central->bottom = os_window->viewport_height - global_state.cell_height - 1;
|
||||
tab_bar->left = central->left; tab_bar->right = central->right; tab_bar->top = central->bottom + 1;
|
||||
tab_bar->bottom = os_window->viewport_height - 1;
|
||||
switch(OPT(tab_bar_edge)) {
|
||||
case TOP_EDGE:
|
||||
central->left = 0; central->top = global_state.cell_height; central->right = os_window->viewport_width - 1;
|
||||
central->bottom = os_window->viewport_height - 1;
|
||||
tab_bar->left = central->left; tab_bar->right = central->right; tab_bar->top = 0;
|
||||
tab_bar->bottom = central->top - 1;
|
||||
break;
|
||||
default:
|
||||
central->left = 0; central->top = 0; central->right = os_window->viewport_width - 1;
|
||||
central->bottom = os_window->viewport_height - global_state.cell_height - 1;
|
||||
tab_bar->left = central->left; tab_bar->right = central->right; tab_bar->top = central->bottom + 1;
|
||||
tab_bar->bottom = os_window->viewport_height - 1;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
memset(tab_bar, 0, sizeof(Region));
|
||||
central->left = 0; central->top = 0; central->right = os_window->viewport_width - 1;
|
||||
@@ -330,6 +340,7 @@ PYWRAP1(set_options) {
|
||||
S(cursor_shape, PyLong_AsLong);
|
||||
S(url_style, PyLong_AsUnsignedLong);
|
||||
S(x11_bell_volume, PyLong_AsLong);
|
||||
S(tab_bar_edge, PyLong_AsLong);
|
||||
S(mouse_hide_wait, PyFloat_AsDouble);
|
||||
S(wheel_scroll_multiplier, PyFloat_AsDouble);
|
||||
S(open_url_modifiers, PyLong_AsUnsignedLong);
|
||||
|
||||
Reference in New Issue
Block a user