Merge remote-tracking branch 'knuesel/feature/hidpi' into develop

This commit is contained in:
Sebastian Ramacher 2018-01-25 13:39:31 +01:00
commit c72e02d65d
2 changed files with 14 additions and 14 deletions

2
README
View file

@ -5,7 +5,7 @@ girara user interface library and several document libraries.
Requirements
------------
gtk3 (>= 3.6)
gtk3 (>= 3.10)
glib (>= 2.50)
girara (>= 0.2.8)
sqlite3 (optional, >= 3.5.9)

View file

@ -656,12 +656,12 @@ draw_thumbnail_image(cairo_surface_t* surface, size_t max_size)
/* note: this always returns 1 and 1 if Cairo too old for device scale API */
zathura_device_factors_t device = get_safe_device_factors(surface);
const unsigned int user_width = width / device.x;
const unsigned int user_height = height / device.y;
const unsigned int unscaled_width = width / device.x;
const unsigned int unscaled_height = height / device.y;
/* create thumbnail surface, taking width and height as device sizes */
/* create thumbnail surface, taking width and height as _unscaled_ device units */
cairo_surface_t *thumbnail;
thumbnail = cairo_surface_create_similar(surface, CAIRO_CONTENT_COLOR, user_width, user_height);
thumbnail = cairo_surface_create_similar(surface, CAIRO_CONTENT_COLOR, unscaled_width, unscaled_height);
if (thumbnail == NULL) {
return NULL;
}