diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-09-05 20:37:39 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-09-05 20:37:39 +0100 |
commit | 9871ca4a2d6ffc8f41634a05c177d5145c339959 (patch) | |
tree | 413f770e62eb135ac89689bd22e1903f510e94f5 /amiga/tree.c | |
parent | 9c49eb3ccc1e4b534ae4b978a38f32cc8d5e7dd1 (diff) | |
download | netsurf-9871ca4a2d6ffc8f41634a05c177d5145c339959.tar.gz netsurf-9871ca4a2d6ffc8f41634a05c177d5145c339959.tar.bz2 |
make the scroll bar disappear if size is -1 (untested)
Diffstat (limited to 'amiga/tree.c')
-rw-r--r-- | amiga/tree.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/amiga/tree.c b/amiga/tree.c index d5ae88591..5aee2772d 100644 --- a/amiga/tree.c +++ b/amiga/tree.c @@ -162,15 +162,27 @@ void ami_tree_resized(struct tree *tree, int width, int height, void *data) { GetAttr(SPACE_AreaBox,twin->objects[GID_BROWSER],(ULONG *)&bbox); - RefreshSetGadgetAttrs((APTR)twin->objects[OID_VSCROLL], twin->win, NULL, - SCROLLER_Total, height, - SCROLLER_Visible, bbox->Height, - TAG_DONE); + if(height == -1) { + SetAttrs((APTR)twin->objects[OID_MAIN], + WINDOW_VertProp, -1, + TAG_DONE); + } else { + RefreshSetGadgetAttrs((APTR)twin->objects[OID_VSCROLL], twin->win, NULL, + SCROLLER_Total, height, + SCROLLER_Visible, bbox->Height, + TAG_DONE); + } - RefreshSetGadgetAttrs((APTR)twin->objects[OID_HSCROLL], twin->win, NULL, - SCROLLER_Total, width, - SCROLLER_Visible, bbox->Width, - TAG_DONE); + if(width == -1) { + SetAttrs((APTR)twin->objects[OID_MAIN], + WINDOW_HorizProp, -1, + TAG_DONE); + } else { + RefreshSetGadgetAttrs((APTR)twin->objects[OID_HSCROLL], twin->win, NULL, + SCROLLER_Total, width, + SCROLLER_Visible, bbox->Width, + TAG_DONE); + } } } |