From 98d18eb9e0278e696505fcbb38f40a22e936de63 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 07 Oct 2017 10:43:49 -0400 Subject: MqTabChrome: Obey zoom.default on zoom reset --- (limited to 'src') diff --git a/src/tab-chrome.c b/src/tab-chrome.c index b92b17a..5eb913f 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -325,7 +325,8 @@ static void zoom_reset_clicked_cb(GtkButton __attribute__((unused)) *button, MqTabChrome *chrome) { - webkit_web_view_set_zoom_level(chrome->web_view, 1.0); + webkit_web_view_set_zoom_level(chrome->web_view, + mq_config_get_double(chrome->config, "zoom.default")); } static void @@ -542,6 +543,7 @@ mq_tab_chrome_new(MqTab *tab, const gchar *uri) MqTabChrome *chrome; chrome = malloc(sizeof(*chrome)); + chrome->config = mq_application_get_config(mq_tab_get_application(tab)); chrome->tab = tab; chrome->container = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); diff --git a/src/tab-chrome.h b/src/tab-chrome.h index ff9c552..850a783 100644 --- a/src/tab-chrome.h +++ b/src/tab-chrome.h @@ -30,6 +30,7 @@ typedef struct MqTabChrome MqTabChrome; #include "tab.h" struct MqTabChrome { + MqConfig *config; MqTab *tab; GtkWidget *container; GtkWidget *back_forward_box; -- cgit v0.9.1