term: resize: pre-calculate right/bottom margins

This commit is contained in:
Daniel Eklöf 2020-02-24 18:38:11 +01:00
parent 7fd380f253
commit d804bc8579
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 51 additions and 55 deletions

View file

@ -237,8 +237,12 @@ struct terminal {
int scale;
int width; /* pixels */
int height; /* pixels */
int x_margin;
int y_margin;
struct {
int left;
int right;
int top;
int bottom;
} margins;
int cols; /* number of columns */
int rows; /* number of rows */
int cell_width; /* pixels per cell, x-wise */