mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-23 19:02:07 +03:00
less cranky scrollbars
This commit is contained in:
parent
5eb7ee97ed
commit
2e11f7f3cb
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user