summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2014-10-25 15:23:31 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2014-10-25 15:23:31 +0100
commit90e6cf85b68df8ec84d67bfb5f48b05446142f07 (patch)
tree94d6102d26f108c04405973077ad9d55cbcf536c /amiga
parentf5d866ab700534e86579952e5f74944bf57aa526 (diff)
downloadnetsurf-90e6cf85b68df8ec84d67bfb5f48b05446142f07.tar.gz
netsurf-90e6cf85b68df8ec84d67bfb5f48b05446142f07.tar.bz2
Toggle vscroll on/off as needed
Diffstat (limited to 'amiga')
-rw-r--r--amiga/gui.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 558852a7a..9e7a92bb6 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2588,6 +2588,7 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw)
browser_window_refresh_url_bar(gwin->bw);
ami_gui_update_hotlist_button(gwin);
+ ami_gui_vscroll_update(gwin);
ami_throbber_redraw_schedule(0, gwin->bw->window);
}
}
@@ -3092,6 +3093,23 @@ static void ami_gui_vscroll_remove(struct gui_window_2 *gwin)
gwin->objects[GID_VSCROLL] = NULL;
}
+static void ami_gui_vscroll_update(struct gui_window_2 *gwin)
+{
+ browser_scrolling hscroll = BW_SCROLLING_YES;
+ browser_scrolling vscroll = BW_SCROLLING_YES;
+
+ browser_window_get_scrollbar_type(gwin->bw, &hscroll, &vscroll);
+
+ /* We only bother with vscroll, as the hscroller is embedded in the
+ bottom window border with the status bar, so toggling it is pointless */
+
+ if(vscroll == BW_SCROLLING_NO) {
+ ami_gui_vscroll_remove(gwin);
+ } else {
+ ami_gui_vscroll_add(gwin);
+ }
+}
+
void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
{
if(ClickTabBase->lib_Version < 53) return;
@@ -3831,8 +3849,6 @@ gui_window_create(struct browser_window *bw,
ScreenToFront(scrn);
-ami_gui_vscroll_add(g->shared);
-
return g;
}
@@ -4878,6 +4894,7 @@ static void gui_window_new_content(struct gui_window *g)
ami_plot_release_pens(&g->shared->shared_pens);
ami_menu_update_disabled(g, c);
ami_gui_update_hotlist_button(g->shared);
+ ami_gui_vscroll_update(g->shared);
}
static bool gui_window_drag_start(struct gui_window *g, gui_drag_type type,