Skip to content

Commit

Permalink
Added support for full content zoom (AKA full page zoom)
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 7, 2009
1 parent 1465169 commit 871c102
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions uzbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,14 @@ cmd_set_status() {
update_title();
}

static void
toggle_zoom_type (WebKitWebView* page, GArray *argv) {
(void)page;
(void)argv;

webkit_web_view_set_full_content_zoom (page, !webkit_web_view_get_full_content_zoom (page));
}

static void
toggle_status_cb (WebKitWebView* page, GArray *argv) {
(void)page;
Expand Down Expand Up @@ -614,6 +622,7 @@ static struct {char *name; Command command[2];} cmdlist[] =
{ "stop", {view_stop_loading, 0}, },
{ "zoom_in", {view_zoom_in, 0}, }, //Can crash (when max zoom reached?).
{ "zoom_out", {view_zoom_out, 0}, },
{ "toggle_zoom_type", {toggle_zoom_type, 0}, },
{ "uri", {load_uri, NOSPLIT} },
{ "js", {run_js, NOSPLIT} },
{ "script", {run_external_js, 0} },
Expand Down
3 changes: 3 additions & 0 deletions uzbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ create_web_view_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer us
static gboolean
download_cb (WebKitWebView *web_view, GObject *download, gpointer user_data);

static void
toggle_zoom_type (WebKitWebView* page, GArray *argv);

static void
toggle_status_cb (WebKitWebView* page, GArray *argv);

Expand Down

0 comments on commit 871c102

Please sign in to comment.