[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 14:48:37
Message-ID: 1207925317.237564.4509.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 795835 by gaboo:
* return correct content size hint if picture height > width
* call updateGeometry when updating the picture -> plasma gets new contentSizeHint
M +6 -1 frame.cpp
--- trunk/extragear/plasma/applets/frame/frame.cpp #795834:795835
@@ -123,7 +123,11 @@
QSizeF Frame::contentSizeHint() const {
if (!m_picture.isNull()) {
- return QSizeF( contentSize().width(), (contentSize().width() / \
m_picture.width() ) * m_picture.height() ); + if (m_picture.width() > \
m_picture.height()) { + return QSizeF( contentSize().width(), \
(contentSize().width() / m_picture.width() ) * m_picture.height() ); + } else \
{ + return QSizeF( (contentSize().height() / m_picture.height()) * \
m_picture.width(), contentSize().height() ); + }
} else {
return contentSize();
}
@@ -403,6 +407,7 @@
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