From 9871ca4a2d6ffc8f41634a05c177d5145c339959 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 5 Sep 2013 20:37:39 +0100 Subject: make the scroll bar disappear if size is -1 (untested) --- amiga/tree.c | 28 ++++++++++++++++++++-------- 1 file 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); + } } } -- cgit v1.2.3