[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: koffice/plugins/defaultTools/defaulttool
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2009-05-16 18:05:17
Message-ID: 1242497117.527641.11346.nullmailer () svn ! kde ! org
[Download RAW message or body]
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
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