summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2017-04-27 23:22:33 +0200
committerDaniel Carl <danielcarl@gmx.de>2017-04-27 23:22:33 +0200
commit48e55c8fc865995c354086a275100da947fb3500 (patch)
tree06fded177f30b2f6584686796f80c5b27457f2f4 /src/normal.c
parent9a48524c7e068ed3952206174fa5a2e8093ada6f (diff)
Changed default-zoom behaviour.
In the previous implementation the default-zoom was only a initial full content zoom applied to the webview. But in case the user changed the zooming and reset it back by using 'zz' the webkit zoom level was set to 1.0 (100%) and not to the initial zoom level like on startup of vimb. This behaviour is strange to under stand and does not fit toe the setting name 'default-zoom'. To make the default-zoom to a real default, the zoom is also applied in case the zoom is reseted by the user via 'zz'.
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c
index 5a43836..156ef52 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -805,8 +805,10 @@ static VbResult normal_zoom(Client *c, const NormalCmdInfo *info)
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;
}