Mercurial > dwindows
diff win/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 | 2a55f61714fd |
children | 4ae67c291a8a |
line wrap: on
line diff
--- a/win/dw.c Wed May 14 22:09:01 2003 +0000 +++ b/win/dw.c Thu May 15 03:38:44 2003 +0000 @@ -847,6 +847,20 @@ (*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) @@ -1050,6 +1064,12 @@ currentx += thisbox->pad; currenty += thisbox->pad; + if(thisbox->grouphwnd) + { + currentx += 3; + currenty += textheight ? textheight : 3; + } + /* The second pass is for expansion and actual placement. */ if(pass > 1) {