diff lwlib/xlwradio.c @ 406:b8cc9ab3f761 r21-2-33

Import from CVS: tag r21-2-33
author cvs
date Mon, 13 Aug 2007 11:17:09 +0200
parents 74fd4e045ea6
children de805c49cfc1
line wrap: on
line diff
--- a/lwlib/xlwradio.c	Mon Aug 13 11:16:09 2007 +0200
+++ b/lwlib/xlwradio.c	Mon Aug 13 11:17:09 2007 +0200
@@ -272,13 +272,13 @@
 
     switch( rw->label.justify ) {
       case XtJustifyLeft:
-	rw->label.label_x += bs(rw) + rw->label.internal_width ;
+	rw->label.label_x += (bs(rw) + rw->label.internal_width) ;
 	break ;
       case XtJustifyRight:
 	break ;
       case XtJustifyCenter:
       default:
-	rw->label.label_x += (bs(rw) + rw->label.internal_width)/2 ;
+	rw->label.label_x += (bs(rw) + rw->label.internal_width)/2;
 	break ;
     }
 }
@@ -374,7 +374,14 @@
     {
       RadioSize(newrw, &newrw->core.width, &newrw->core.height) ;
     }
-
+    
+    /* The label set values routine can resize the widget. We need to 
+     * recalculate if this is true.
+     */
+    if (newrw->label.label_x != oldrw->label.label_x)
+    {
+      RadioResize (new);
+    }
     return FALSE ;
 }