Bug 112991 - classifier widget in class diagram width is to large
Summary: classifier widget in class diagram width is to large
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-21 10:41 UTC by Peter Soetens
Modified: 2005-09-21 19:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
PATCH: calculate correct class widget size (673 bytes, patch)
2005-09-21 10:52 UTC, Peter Soetens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Soetens 2005-09-21 10:41:21 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3 
OS:                Linux

For most font types the width is to large when operations are shown that are not italic. I have a patch for this bug.
Comment 1 Peter Soetens 2005-09-21 10:52:54 UTC
Created attachment 12644 [details]
PATCH: calculate correct class widget size

This patch will 'break' the layout of some class diagrams since the width of
classes will shrink. This can only be fixed in turn by storing the 'center'
position of a widget instead of the topleft corner.
Comment 2 Oliver Kellogg 2005-09-21 19:39:44 UTC
SVN commit 462672 by okellogg:

calculateSize(): The font for displaying non-abstract operations is FT_NORMAL.
Thanks to Peter Soetens <peter.soetens_AT_mech.kuleuven.be> for the fix.
BUG:112991


 M  +1 -1      classifierwidget.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/classifierwidget.cpp #462671:462672
@@ -375,7 +375,7 @@
                 continue;
             const QString displayedOp = op->toString(m_ShowOpSigs);
             UMLWidget::FontType oft;
-            oft = (op->getAbstract() ? UMLWidget::FT_ITALIC : UMLWidget::FT_BOLD);
+            oft = (op->getAbstract() ? UMLWidget::FT_ITALIC : UMLWidget::FT_NORMAL);
             const int w = UMLWidget::getFontMetrics(oft).size(0,displayedOp).width();
             if (w > width)
                 width = w;