[Kst] extragear/graphics/kst/src/libkstapp

Duncan Hanson duncan.hanson at gmail.com
Wed May 24 20:48:48 CEST 2006


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