summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMatthew Petroff <[email protected]>2016-10-19 12:36:30 -0400
committerraveit65 <[email protected]>2017-08-15 15:31:07 +0200
commitc75f49d323a17d244e3363c2fc9152bc275c5fb2 (patch)
treeb4639d39a203c15e702b06973b0626222d9fc561 /shell
parent31251cb1202aec7cb3bb1addfbbfe55c125f10d7 (diff)
downloadatril-c75f49d323a17d244e3363c2fc9152bc275c5fb2.tar.bz2
atril-c75f49d323a17d244e3363c2fc9152bc275c5fb2.tar.xz
Take monitor scale factor into account when calculating zoom.
https://github.com/linuxmint/xreader/commit/c47a1f4
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 94cd5071..88cfa5f7 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -384,9 +384,11 @@ static gdouble
get_screen_dpi (EvWindow *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);
}
static void