From d31aa9a95933413b4c51f60689710fd76944b96d Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 25 Oct 2014 19:24:58 +0100 Subject: Use more sensible default value for size gadget width --- amiga/gui.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'amiga') diff --git a/amiga/gui.c b/amiga/gui.c index eb554989b..939619be2 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3882,15 +3882,16 @@ static ULONG ami_get_border_gadget_balance(struct gui_window_2 *gwin, ULONG *siz ** a convenience. */ - ULONG sz = 30; /* temporary arbitrary value */ + ULONG sz; ULONG available_width; float gad1percent; - /**TODO: This is getting the width of the vertical scroll bar, which is not - necessarily the same as the width of the size gadget that we are - supposed to be accounting for. */ + /** \TODO sz is supposed to be the width of the window's size gadget, + possibly + scrn->WBorRight. if(gwin->objects[GID_VSCROLL]) GetAttr(GA_Width, gwin->objects[GID_VSCROLL], (ULONG *)&sz); + */ + sz = 24; /* old calculated width on my system */ available_width = gwin->win->Width - scrn->WBorLeft - sz; -- cgit v1.2.3