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

Gopala Krishna A krishna.ggk at gmail.com
Sat Jul 12 21:12:06 UTC 2008


SVN commit 831528 by gopala:

1) NoteWidget's precondition and postcondition text no longer come out of the the widget's outer rectangle drawn.
2) First test of Line Breakage feature of TextItemGroup with NoteWidget and it works like charm. Yay!!


 M  +6 -5      notewidget.cpp  


--- branches/work/soc-umbrello/umbrello/notewidget.cpp #831527:831528
@@ -223,8 +223,6 @@
         noteTypeItem->hide();
     }
 
-
-
     TextItem *noteTextItem = m_textItemGroup->textItemAt(NoteTextItemIndex);
     dummy.copyAttributesTo(noteTextItem);
 
@@ -240,9 +238,12 @@
     m_textItemGroup->setLineBreakWidth(widthWithoutNote == 0 ? TextItemGroup::NoLineBreak : widthWithoutNote);
     m_minimumSize = m_textItemGroup->calculateMinimumSize();
 
-    // Make sure the minimum size is atleast 100,80
-    m_minimumSize = m_minimumSize.expandedTo(QSizeF(100, 80));
+    m_minimumSize.rwidth() += 2 * NoteWidget::Margin;
+    m_minimumSize.rheight() += 2 * NoteWidget::Margin;
 
+    // Make sure the minimum size is atleast 100,30
+    m_minimumSize = m_minimumSize.expandedTo(QSizeF(100, 30));
+
     NewUMLRectWidget::updateGeometry();
 }
 
@@ -251,7 +252,7 @@
 {
     QSizeF groupSize = size();
     groupSize.rwidth() -= NoteWidget::Margin * 2;
-    groupSize.rwidth() -= NoteWidget::Margin * 2;
+    groupSize.rheight() -= NoteWidget::Margin * 2;
     m_textItemGroup->alignVertically(groupSize);
 
     QPointF offset(NoteWidget::Margin, NoteWidget::Margin);




More information about the umbrello-devel mailing list