summaryrefslogtreecommitdiff
path: root/previewer
diff options
context:
space:
mode:
authorMatthew Petroff <[email protected]>2016-10-19 12:36:30 -0400
committerraveit65 <[email protected]>2017-08-12 22:01:34 +0200
commita134dcdcd6e4b6934c5e8f3cc66ac824d9914d5b (patch)
treebbe658f472fde31e398e90ed74c888f332a71022 /previewer
parentb6a20b77926727af99b39773ee104ffa457c604f (diff)
downloadatril-a134dcdcd6e4b6934c5e8f3cc66ac824d9914d5b.tar.bz2
atril-a134dcdcd6e4b6934c5e8f3cc66ac824d9914d5b.tar.xz
Take monitor scale factor into account when calculating zoom.
https://github.com/linuxmint/xreader/commit/c47a1f4
Diffstat (limited to 'previewer')
-rw-r--r--previewer/ev-previewer-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c
index e92eb75d..45545fbf 100644
--- a/previewer/ev-previewer-window.c
+++ b/previewer/ev-previewer-window.c
@@ -71,9 +71,11 @@ static gdouble
get_screen_dpi (EvPreviewerWindow *window)
{
GdkScreen *screen;
+ gint monitor;
screen = gtk_window_get_screen (GTK_WINDOW (window));
- return ev_document_misc_get_screen_dpi (screen);
+ monitor = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(GTK_WIDGET(GTK_WINDOW(window))));
+ return ev_document_misc_get_screen_dpi (screen, monitor);
}
#if GTKUNIXPRINT_ENABLED