summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-chrome.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 97dd210..dac1340 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -302,6 +302,29 @@ uri_activate_cb(GtkEntry *entry, MqTabChrome *chrome)
}
static void
+zoom_out_clicked_cb(GtkButton __attribute__((unused)) *button,
+ MqTabChrome *chrome)
+{
+ webkit_web_view_set_zoom_level(chrome->web_view,
+ webkit_web_view_get_zoom_level(chrome->web_view) - 0.1);
+}
+
+static void
+zoom_reset_clicked_cb(GtkButton __attribute__((unused)) *button,
+ MqTabChrome *chrome)
+{
+ webkit_web_view_set_zoom_level(chrome->web_view, 1.0);
+}
+
+static void
+zoom_in_clicked_cb(GtkButton __attribute__((unused)) *button,
+ MqTabChrome *chrome)
+{
+ webkit_web_view_set_zoom_level(chrome->web_view,
+ webkit_web_view_get_zoom_level(chrome->web_view) + 0.1);
+}
+
+static void
quit_clicked_cb(GtkButton __attribute__((unused)) *button,
MqTabChrome __attribute__((unused)) *chrome)
{
@@ -354,6 +377,9 @@ menu_button_clicked_cb(GtkToolButton *tool_button,
NEW_BUTTON(5, 0, "help-about", "About Marquee");
NEW_BUTTON(5, 2, "application-exit", "Quit");
+ CLICKED_CB(0, 0, zoom_out_clicked_cb);
+ CLICKED_CB(0, 1, zoom_reset_clicked_cb);
+ CLICKED_CB(0, 2, zoom_in_clicked_cb);
CLICKED_CB(5, 2, quit_clicked_cb);
/* Set up the popover. */