mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-24 01:40:12 -05:00
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.
This commit is contained in:
parent
e0f3703ae6
commit
21a8d832ce
8 changed files with 120 additions and 55 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue