[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: koffice/plugins/defaultTools/defaulttool
From:       jaham () gmx ! net
Date:       2009-05-17 21:25:53
Message-ID: 200905172325.54063.jaham () gmx ! net
[Download RAW message or body]

On Saturday 16 May 2009 20:05:17 Thorsten Zachmann wrote:
> SVN commit 968839 by zachmann:
>
> o Make the outline follow the mouse when resizing from center. Up to now
>   the outline was moving only with half the distance.
>
> Can someone please review so I can backport to 2.0

Looks and works good.

Ciao Jan

>
> CCMAIL: koffice-devel@kde.org
>
>
>  M  +5 -1      ShapeResizeStrategy.cpp
>
>
> --- trunk/koffice/plugins/defaultTools/defaulttool/ShapeResizeStrategy.cpp
> #968838:968839 @@ -113,6 +113,10 @@
>
>      QPointF distance = m_unwindMatrix.map(newPos) - m_unwindMatrix.map(
> m_start );
>
> +    const bool scaleFromCenter = modifiers & Qt::ControlModifier;
> +    if (scaleFromCenter) {
> +        distance *= 2.0;
> +    }
>      qreal zoomX=1, zoomY=1;
>      if (m_left)
>          zoomX = (startWidth - distance.x()) / startWidth;
> @@ -122,6 +126,7 @@
>          zoomY = (startHeight - distance.y()) / startHeight;
>      else if (m_bottom)
>          zoomY = (startHeight + distance.y()) / startHeight;
> +
>      if (keepAspect) {
>          const bool cornerUsed = ((m_bottom?1:0) + (m_top?1:0) +
> (m_left?1:0) + (m_right?1:0)) == 2; if ((cornerUsed && startWidth <
> startHeight) || m_left || m_right) @@ -130,7 +135,6 @@
>              zoomX = zoomY;
>      }
>
> -    bool scaleFromCenter = modifiers & Qt::ControlModifier;
>      QPointF move;
>
>      if (scaleFromCenter)

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic