[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 10:25:15
Message-ID: 8D12DD9C-8230-42FA-8ABC-AE3BE591D7CC () gmail ! com
[Download RAW message or body]

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