From 6abfeb6a43574ce1dad797efff079562434a7c60 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 12 Oct 2017 18:17:06 -0400 Subject: MqTabChrome: Call mq_web_view_zoom_*() in zoom button callbacks --- (limited to 'src') diff --git a/src/tab-chrome.c b/src/tab-chrome.c index df29807..703dab1 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -315,24 +315,19 @@ home_clicked_cb(GtkToolButton G_GNUC_UNUSED *toolbutton, static void zoom_out_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - webkit_web_view_set_zoom_level(WEBKIT_WEB_VIEW(chrome->web_view), - webkit_web_view_get_zoom_level( - WEBKIT_WEB_VIEW(chrome->web_view)) - 0.1); + mq_web_view_zoom_out(chrome->web_view); } static void zoom_reset_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - webkit_web_view_set_zoom_level(WEBKIT_WEB_VIEW(chrome->web_view), - mq_config_get_double(chrome->config, "zoom.default")); + mq_web_view_zoom_reset(chrome->web_view); } static void zoom_in_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - webkit_web_view_set_zoom_level(WEBKIT_WEB_VIEW(chrome->web_view), - webkit_web_view_get_zoom_level( - WEBKIT_WEB_VIEW(chrome->web_view)) + 0.1); + mq_web_view_zoom_in(chrome->web_view); } static void -- cgit v0.9.1