diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-06-30 16:40:56 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-07-01 09:27:20 +0100 |
commit | 18aefabd20a16dda9ed5363088f0da5ada0d4431 (patch) | |
tree | 9447e1e0edb1d93b8ad575472e67bf7f844c5ca3 /atari/gui.c | |
parent | 06eb81235d975bc7721719d25ac114b4ab2c94da (diff) | |
download | netsurf-18aefabd20a16dda9ed5363088f0da5ada0d4431.tar.gz netsurf-18aefabd20a16dda9ed5363088f0da5ada0d4431.tar.bz2 |
change reformat to be driven from the scheduler like redraw
Diffstat (limited to 'atari/gui.c')
-rw-r--r-- | atari/gui.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/atari/gui.c b/atari/gui.c index 608d0d859..efa23efe4 100644 --- a/atari/gui.c +++ b/atari/gui.c @@ -201,7 +201,6 @@ gui_window_create(struct browser_window *bw, option_window_x, option_window_y, option_window_width, option_window_height }; - gui_window_set_scale(gw, 1.0); gui_window_set_url(gw, ""); gui_window_set_pointer(gw, BROWSER_POINTER_DEFAULT); gui_set_input_gui_window(gw); @@ -343,21 +342,14 @@ void gui_window_set_status(struct gui_window *w, const char *text) window_set_stauts(w->root, (char*)text); } -float gui_window_get_scale(struct gui_window *gw) +static void atari_window_reformat(struct gui_window *gw) { - return(gw->scale); -} - -void gui_window_set_scale(struct gui_window *gw, float scale) -{ - int width = 0, heigth = 0; + int width = 0, height = 0; - LOG(("scale: %f", scale)); - - gw->scale = MAX(scale, 0.25); - - gui_window_get_dimensions(gw, &width, &heigth, true); - browser_window_reformat(gw->browser->bw, false, width, heigth); + if (gw != NULL) { + gui_window_get_dimensions(gw, &width, &height, true); + browser_window_reformat(gw->browser->bw, false, width, height); + } } static void gui_window_redraw_window(struct gui_window *gw) @@ -1017,6 +1009,7 @@ static struct gui_window_table atari_window_table = { .set_scroll = gui_window_set_scroll, .get_dimensions = gui_window_get_dimensions, .update_extent = gui_window_update_extent, + .reformat = atari_window_reformat, .set_title = gui_window_set_title, .set_url = gui_window_set_url, |