Skip to content

Commit

Permalink
hidpi: Work towards an ideal DPI value rather than arbitrarily double…
Browse files Browse the repository at this point in the history
… the zoom passed a certain DPI
  • Loading branch information
clefebvre committed Sep 25, 2015
1 parent 2b51eeb commit dac0097
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gui/mdmwebkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,13 +952,14 @@ static void webkit_init (void) {
NULL);
if (out) {
scale = atoi (out);
scale = CLAMP (scale, 1, 2);
scale = CLAMP (scale, 10, 20);
g_free (out);
}

if (scale > 1) {
if (scale > 10) {
g_object_set (G_OBJECT(webView), "full-content-zoom", TRUE, NULL);
webkit_web_view_set_zoom_level (webView, (float) scale);
float zoom_level = (float) scale / (float) 10;
webkit_web_view_set_zoom_level (webView, zoom_level);
}

webkit_web_view_set_settings (WEBKIT_WEB_VIEW(webView), settings);
Expand Down

0 comments on commit dac0097

Please sign in to comment.