changeset 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 96460bd4c679
children c607fd86e5c2
files os2/dw.c win/dw.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
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;
--- a/win/dw.c	Thu Dec 01 08:51:05 2011 +0000
+++ b/win/dw.c	Thu Dec 01 09:04:09 2011 +0000
@@ -1144,7 +1144,6 @@
       else
          thisbox->grouppady = 6;
 
-      dw_debug("grouppady %d\n", thisbox->grouppady);
       thisbox->grouppadx = 6;
 
       (*usedx) += thisbox->grouppadx;