[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sat Oct 29 05:08:27 UTC 2005


SVN commit 475464 by okellogg:

draw(): slight improvement to the resize behavior

 M  +3 -1      actorwidget.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/actorwidget.cpp #475463:475464
@@ -38,7 +38,9 @@
     const int textWidth = fm.width(getName());
     const int fontHeight = fm.lineSpacing();
     const int a_height = h - fontHeight - A_MARGIN;
-    const int a_width = (a_height/2 > w || w > textWidth + A_MARGIN * 2 ? w : a_height/2);
+    const int h2 = a_height / 2;
+    const int w2 = w - A_MARGIN * 2;
+    const int a_width = (h2 > w2 || w > textWidth + A_MARGIN * 2 ?  w2 : h2);
     const int middleX = w / 2;
     const int thirdY = a_height / 3;
 




More information about the umbrello-devel mailing list