[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: branches/work/koffice-ko/kchart/shape
From: Johannes Simon <johannes.simon () gmail ! com>
Date: 2010-04-17 19:44:22
Message-ID: 76F12352-0DF2-4404-B858-2FCEF0BC9790 () gmail ! com
[Download RAW message or body]
Sorry, a common confusion of mine: qMax is not used to specify a maximum but a \
minimum value :-) Makes sense of course, but I always read "use first argument as \
maximum" instead of "maximum of these two values" :/
Am 17.04.2010 um 12:25 schrieb Johannes Simon:
> I know this commit is a bit older, but I just stumbled over these couple lines in \
> the code. Why do you use qMax here and set a maximum limit to the size of the \
> label?
> Am 31.03.2010 um 14:41 schrieb Sebastian Sauer:
>
> > SVN commit 1109539 by sebsauer:
> >
> > Read and eval the svg:x and svg:y positions for labels. Also set the label
> >
> > M +86 -63 ChartShape.cpp
> >
> > <snip>
> > + // 3. set the size
> > + QSizeF size = shape->size()
> > + QRect r = QFontMetrics( doc->defaultFont() ).boundingRect(
> > + labelData->shapeMargins().left, \
> > labelData->shapeMargins().top, + \
> > qMax( CM_TO_POINT( 5 ), size.width() - pos.x() * 2.0 - \
> > labelData->shapeMargins().right ), + qMax( CM_TO_POINT( 0.6 ), \
> > size.height() - labelData->shapeMargins().bottom ), + \
> > Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, doc->toPlainText() ); + \
> > label->setSize( r.size() );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic