[Uml-devel] branches/work/soc-umbrello/umbrello

Gopala Krishna A krishna.ggk at gmail.com
Sat Aug 30 13:11:09 UTC 2008


SVN commit 854858 by gopala:

Removed margin handling code because TextItemGroup handles margin now.



 M  +4 -5      actorwidget.cpp  


--- branches/work/soc-umbrello/umbrello/actorwidget.cpp #854857:854858
@@ -84,7 +84,6 @@
 	if(change == SizeHasChanged) {
 		// Calculate new path and position the text.
 		const QSizeF sz = size();
-		const qreal m = margin();
 
 		const int groupIndex = 0; // Only one group
 		TextItemGroup *grp = textItemGroupAt(groupIndex);
@@ -92,13 +91,13 @@
 		// First adjust the position of text and align it.
 		qreal fontHeight = grp->minimumSize().height();
 
-		QRectF r(m, rect().bottom() - fontHeight - m,
-				 sz.width() - 2 * m, fontHeight);
+		QRectF r(0, rect().bottom() - fontHeight,
+				 sz.width(), fontHeight);
 		grp->setGroupGeometry(r);
 
 		// Now calculate actorPath
 		m_actorPath = QPainterPath();
-		qreal actorHeight = r.top() - m;
+		qreal actorHeight = r.top();
 		qreal actorWidth = r.width();
 
 		// Make sure width of actor isn't too much, it looks ugly otherwise.
@@ -108,7 +107,7 @@
 		//TODO: Probably use above similar approach to limit height.
 
 		QRectF headEllipse;
-		headEllipse.setTopLeft(QPointF(.5 * (sz.width() - actorWidth), m));
+		headEllipse.setTopLeft(QPointF(.5 * (sz.width() - actorWidth), 0));
 		headEllipse.setSize(QSizeF(actorWidth, actorHeight / 3));
 		m_actorPath.addEllipse(headEllipse);
 




More information about the umbrello-devel mailing list