Mercurial > dwindows
diff os2/dw.c @ 416:a4197ddfc50d
Changes to calculate groupbox border widths and take this into account
when calculating window positions.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 15 May 2003 03:38:44 +0000 |
parents | fecd529ba9d4 |
children | 4be57ee7e006 |
line wrap: on
line diff
--- a/os2/dw.c Wed May 14 22:09:01 2003 +0000 +++ b/os2/dw.c Thu May 15 03:38:44 2003 +0000 @@ -880,10 +880,25 @@ /* Used for the SIZEEXPAND */ int nux = *usedx, nuy = *usedy; int nupx = *usedpadx, nupy = *usedpady; + int textheight = 0; (*usedx) += (thisbox->pad * 2); (*usedy) += (thisbox->pad * 2); + if(thisbox->grouphwnd) + { + char *text = dw_window_get_text(thisbox->grouphwnd); + + if(text) + { + dw_font_text_extents(thisbox->grouphwnd, 0, text, NULL, &textheight); + dw_free(text); + } + + (*usedx) += 6; + (*usedy) += textheight ? (3 + textheight) : 6; + } + for(z=0;z<thisbox->count;z++) { if(thisbox->items[z].type == TYPEBOX) @@ -1087,6 +1102,12 @@ currentx += thisbox->pad; currenty += thisbox->pad; + if(thisbox->grouphwnd) + { + currentx += 3; + currenty += 3; + } + /* The second pass is for expansion and actual placement. */ if(pass > 1) {