[Kst] [Bug 121159] "Maintain aspect ratio" option for images
Duncan Hanson
duncan.hanson at gmail.com
Wed May 24 20:48:54 CEST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=121159
duncan.hanson gmail com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
------- Additional Comments From duncan.hanson gmail com 2006-05-24 20:48 -------
SVN commit 544402 by dhanson:
BUG:121159 objects with _maintainAspect == true will now maintain their aspect on parent resize.
M +6 -0 kstviewobject.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #544401:544402
@ -1455,6 +1455,12 @
_geom.setTop(geom.top() + int(_aspect.y * geom.height()));
_geom.setRight(geom.left() + int((_aspect.x + _aspect.w) * geom.width()) - 1);
_geom.setBottom(geom.top() + int((_aspect.y + _aspect.h) * geom.height()) - 1);
+
+ if (_maintainAspect == true) {
+ QSize maintaining_size(myOldGeom.size());
+ maintaining_size.scale(_geom.size(),QSize::ScaleMin);
+ _geom.setSize(maintaining_size);
+ }
}
if (_geom.width() < _minimumSize.width() || _geom.height() < _minimumSize.height()) {
_geom.setSize(_geom.size().expandedTo(_minimumSize));
More information about the Kst
mailing list