mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-28 07:58:00 -04:00
term: get rid of term->font_scale, use term->scale only
We only needed term->font_scale to be able to detect scaling factor changes (term->font_scale != term->scale). But, we already have the old scaling factor in all places where term_font_dpi_changed() is called, so let’s pass the old scaling factor as an argument instead.
This commit is contained in:
parent
e7c01f3e52
commit
2afc678236
3 changed files with 16 additions and 22 deletions
|
|
@ -320,7 +320,6 @@ struct terminal {
|
|||
struct config_font *font_sizes[4];
|
||||
struct pt_or_px font_line_height;
|
||||
float font_dpi;
|
||||
int font_scale; /* scaling factor last time we loaded fonts */
|
||||
int16_t font_x_ofs;
|
||||
int16_t font_y_ofs;
|
||||
enum fcft_subpixel font_subpixel;
|
||||
|
|
@ -614,7 +613,7 @@ bool term_paste_data_to_slave(
|
|||
bool term_font_size_increase(struct terminal *term);
|
||||
bool term_font_size_decrease(struct terminal *term);
|
||||
bool term_font_size_reset(struct terminal *term);
|
||||
bool term_font_dpi_changed(struct terminal *term);
|
||||
bool term_font_dpi_changed(struct terminal *term, int old_scale);
|
||||
void term_font_subpixel_changed(struct terminal *term);
|
||||
int term_pt_or_px_as_pixels(
|
||||
const struct terminal *term, const struct pt_or_px *pt_or_px);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue