.B closed-max-items (int)
Maximum number of stored last closed URLs.
If closed-max-items is set to 0, closed URLs will not be stored.
+.TP
+.B default-zoom (int)
+Default Full-Content zoom level in percent. Default is 100.
.SH FILES
.TP
.IR $XDG_CONFIG_HOME/vimb[/PROFILE]
GdkRGBA comp_fg[COMP_LAST];
GdkRGBA comp_bg[COMP_LAST];
PangoFontDescription *comp_font;
+ guint default_zoom; /* default zoom level in percent */
} config;
struct {
GSList *list;
count = info->count ? (float)info->count : 1.0;
- if (info->key2 == 'z') { /* zz reset zoom */
- webkit_web_view_set_zoom_level(view, 1.0);
+ /* zz reset zoom to it's default zoom level */
+ if (info->key2 == 'z') {
+ webkit_settings_set_zoom_text_only(webkit_web_view_get_settings(view), FALSE);
+ webkit_web_view_set_zoom_level(view, c->config.default_zoom / 100.0);
return RESULT_COMPLETE;
}
static int default_zoom(Client *c, const char *name, DataType type, void *value, void *data)
{
- float zoom = (float)*(int*)value / 100.0;
+ /* Store the percent value in the client config. */
+ c->config.default_zoom = *(int*)value;
+ /* Apply the default zoom to the webview. */
webkit_settings_set_zoom_text_only(webkit_web_view_get_settings(c->webview), FALSE);
- webkit_web_view_set_zoom_level(c->webview, zoom);
+ webkit_web_view_set_zoom_level(c->webview, c->config.default_zoom / 100.0);
return CMD_SUCCESS;
}