From 21a8d832ce12217ddd493cdcaefdc457128f2ada Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Wed, 17 Jan 2024 15:00:14 -0500 Subject: feature: add resize-by-cells option to constrain window sizes... ...to multiples of the cell size, and preserve grid size when changing fonts or display scales in floating windows. --- terminal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index 787eaf2d..b0120c6a 100644 --- a/terminal.c +++ b/terminal.c @@ -784,10 +784,11 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4], * render_resize() after this function */ if (resize_grid) { /* Use force, since cell-width/height may have changed */ - render_resize_force( + render_resize( term, (int)roundf(term->width / term->scale), - (int)roundf(term->height / term->scale)); + (int)roundf(term->height / term->scale), + RESIZE_FORCE | RESIZE_KEEP_GRID); } return true; } -- cgit v1.3