mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 20:56:00 +01:00
If new PPI is significantly different, yes render and refresh
This commit is contained in:
parent
1e170f0cab
commit
8e3f056121
1 changed files with 7 additions and 3 deletions
|
@ -192,9 +192,13 @@ zathura_update_view_ppi(zathura_t* zathura)
|
|||
}
|
||||
#endif
|
||||
|
||||
girara_debug("monitor width: %d mm, pixels: %d, ppi: %f", width_mm, monitor_geom.width, ppi);
|
||||
|
||||
zathura_document_set_viewport_ppi(zathura->document, ppi);
|
||||
double current_ppi = zathura_document_get_viewport_ppi(zathura->document);
|
||||
if (fabs(ppi - current_ppi) > DBL_EPSILON) {
|
||||
girara_debug("monitor width: %d mm, pixels: %d, ppi: %f", width_mm, monitor_geom.width, ppi);
|
||||
zathura_document_set_viewport_ppi(zathura->document, ppi);
|
||||
render_all(zathura);
|
||||
refresh_view(zathura);
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
Loading…
Reference in a new issue