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

List:       kde-commits
Subject:    extragear/plasma/applets/frame
From:       Gaƫl Beaudoin <gaboo () gaboo ! org>
Date:       2008-04-11 16:15:35
Message-ID: 1207930535.581247.7292.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 795853 by gaboo:

put updateGeometry() at a better place I think. And use a temporary local variable in \
contentSizeHint for easize debugging

 M  +5 -3      frame.cpp  


--- trunk/extragear/plasma/applets/frame/frame.cpp #795852:795853
@@ -123,12 +123,14 @@
 
 QSizeF Frame::contentSizeHint() const {
     if (!m_picture.isNull()) {
+        QSizeF sizeHint;
         qreal maxSize = contentSize().width() > contentSize().height() ? \
contentSize().width() : contentSize().height();  if (m_picture.width() > \
                m_picture.height()) {
-            return QSizeF( maxSize, (maxSize / m_picture.width()) * \
m_picture.height() ); +            sizeHint = QSizeF( maxSize, (maxSize / \
m_picture.width()) * m_picture.height() );  } else {
-            return QSizeF( (maxSize / m_picture.height()) * m_picture.width(), \
maxSize ); +            sizeHint = QSizeF( (maxSize / m_picture.height()) * \
m_picture.width(), maxSize );  }
+        return sizeHint;
     } else {
         return contentSize();
     }
@@ -324,6 +326,7 @@
 {
     if (m_pixmapCache.isNull() ||
         contentRect().toRect().size() != m_pixmapCache.size()) {
+        updateGeometry();
         paintCache(option, contentRect().toRect().size());
     }
 
@@ -408,7 +411,6 @@
         p->setPen(QPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
         p->drawPath(framePath);
     }
-    updateGeometry();
 
     delete p;
 }


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

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