g_object_set(G_OBJECT(setting), "enable-default-context-menu", false, NULL);
}
- vb.config.default_zoom = 1.0;
-
#ifdef FEATURE_HIGH_DPI
/* fix for high dpi displays */
GdkScreen *screen = gdk_window_get_screen(gtk_widget_get_window(vb.gui.window));
#ifdef FEATURE_SOUP_CACHE
static int soup_cache(const char *name, int type, void *value, void *data);
#endif
+#ifdef FEATURE_DEFAULT_ZOOM
+static int default_zoom(const char *name, int type, void *value, void *data);
+#endif
static gboolean validate_js_regexp_list(const char *pattern);
void setting_init()
#endif
setting_add("x-hint-command", TYPE_CHAR, &":o <C-R>;", NULL, 0, NULL);
+#ifdef FEATURE_DEFAULT_ZOOM
+ i = 100;
+ setting_add("default_zoom", TYPE_INTEGER, &i, default_zoom, 0, &vb.config.default_zoom);
+#endif
+
/* initialize the shortcuts and set the default shortcuts */
shortcut_init();
shortcut_add("dl", "https://duckduckgo.com/html/?q=$0");
}
#endif
+#ifdef FEATURE_DEFAULT_ZOOM
+static int default_zoom(const char *name, int type, void *value, void *data)
+{
+ *(float*)data = (float)*(int*)value / 100.0;
+
+ webkit_web_view_set_full_content_zoom(vb.gui.webview, true);
+ webkit_web_view_set_zoom_level(vb.gui.webview, vb.config.default_zoom);
+
+ return VB_CMD_SUCCESS;
+}
+#endif
+
/**
* Validated syntax given list of JavaScript RegExp patterns.
* If validation fails, the error is shown to the user.