less cranky scrollbars

This commit is contained in:
Chris Young 2017-01-03 18:03:43 +00:00
parent 5eb7ee97ed
commit 2e11f7f3cb

View File

@ -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;
}
if(height == -1) {
ami_cw_toggle_scrollbar(ami_cw, true, false);
return;
}
if(ami_cw->objects[GID_CW_VSCROLL]) {
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]) {
} 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);
TAG_DONE);
}
if(height == -1) {
ami_cw_toggle_scrollbar(ami_cw, true, false);
} 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);
}
}