Mercurial > dwindows
diff os2/dw.c @ 1409:93eb987c05cf
Same basic groupbox fix for OS/2.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 01 Dec 2011 09:04:09 +0000 |
parents | 2f10480d2c8a |
children | 22ba64e357de |
line wrap: on
line diff
--- a/os2/dw.c Thu Dec 01 08:51:05 2011 +0000 +++ b/os2/dw.c Thu Dec 01 09:04:09 2011 +0000 @@ -1060,13 +1060,19 @@ { char *text = dw_window_get_text(thisbox->grouphwnd); - thisbox->grouppady = 0; + thisbox->grouppady = 9; if(text) { - dw_font_text_extents_get(thisbox->grouphwnd, 0, text, NULL, &thisbox->grouppady); + if(*text) + dw_font_text_extents_get(thisbox->grouphwnd, 0, text, NULL, &thisbox->grouppady); dw_free(text); } + /* If the string height is less than 9... + * set it to 9 anyway since that is the minimum. + */ + if(thisbox->grouppady < 9) + thisbox->grouppady = 9; if(thisbox->grouppady) thisbox->grouppady += 3;