From 2e11f7f3cbd7d563cb525a26ce79d76502ba7686 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 3 Jan 2017 18:03:43 +0000 Subject: less cranky scrollbars --- frontends/amiga/corewindow.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'frontends/amiga/corewindow.c') diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c index e5d289a88..59fc3e16b 100644 --- a/frontends/amiga/corewindow.c +++ b/frontends/amiga/corewindow.c @@ -616,28 +616,22 @@ ami_cw_update_size(struct core_window *cw, int width, int height) if(width == -1) { ami_cw_toggle_scrollbar(ami_cw, false, false); - return; + } else { + ami_cw_toggle_scrollbar(ami_cw, false, true); + RefreshSetGadgetAttrs((struct Gadget *)ami_cw->objects[GID_CW_HSCROLL], ami_cw->win, NULL, + SCROLLER_Total, (ULONG)width, + SCROLLER_Visible, win_w, + TAG_DONE); } if(height == -1) { ami_cw_toggle_scrollbar(ami_cw, true, false); - return; - } - - if(ami_cw->objects[GID_CW_VSCROLL]) { + } else { ami_cw_toggle_scrollbar(ami_cw, true, true); RefreshSetGadgetAttrs((struct Gadget *)ami_cw->objects[GID_CW_VSCROLL], ami_cw->win, NULL, SCROLLER_Total, height, SCROLLER_Visible, win_h, - TAG_DONE); - } - - if(ami_cw->objects[GID_CW_HSCROLL]) { - ami_cw_toggle_scrollbar(ami_cw, false, true); - RefreshSetGadgetAttrs((struct Gadget *)ami_cw->objects[GID_CW_HSCROLL], ami_cw->win, NULL, - SCROLLER_Total, (ULONG)width, - SCROLLER_Visible, win_w, - TAG_DONE); + TAG_DONE); } } -- cgit v1.2.3