If new PPI is significantly different, yes render and refresh

This commit is contained in:
Jeremie Knuesel 2018-02-23 15:26:43 +01:00
parent 1e170f0cab
commit 8e3f056121

View file

@ -192,9 +192,13 @@ zathura_update_view_ppi(zathura_t* zathura)
} }
#endif #endif
girara_debug("monitor width: %d mm, pixels: %d, ppi: %f", width_mm, monitor_geom.width, ppi); double current_ppi = zathura_document_get_viewport_ppi(zathura->document);
if (fabs(ppi - current_ppi) > DBL_EPSILON) {
zathura_document_set_viewport_ppi(zathura->document, ppi); 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 static bool