[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/plasma/applets/comic
From: Thomas Georgiou <tageorgiou () gmail ! com>
Date: 2008-04-13 17:07:14
Message-ID: 1208106434.022547.14823.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 796492 by tgeorgiou:
Hello comic!
M +6 -6 comic.cpp
--- trunk/extragear/plasma/applets/comic/comic.cpp #796491:796492
@@ -40,7 +40,7 @@
{
setHasConfigurationInterface( true );
- setContentSize( QSizeF( 300, 100 ) );
+ resize( 300, 100 );
loadConfig();
@@ -122,7 +122,7 @@
{
event->ignore();
- if ( event->button() == Qt::LeftButton && contentRect().contains( event->pos() ) \
) { + if ( event->button() == Qt::LeftButton && geometry().contains( event->pos() \
) ) { QFontMetrics fm = Plasma::Theme::self()->fontMetrics();
if ( mShowPreviousButton && event->pos().x() < s_arrowWidth ) {
@@ -147,18 +147,18 @@
const QSizeF size = mImage.size();
if ( mScaleComic ) {
- return QSizeF( contentSize().width(), (contentSize().width() / \
size.width() ) * size.height() ); + return QSizeF( geometry().width(), \
(geometry().width() / size.width() ) * size.height() ); } else {
return QSizeF( size.width() + 2 * s_arrowWidth, size.height() + \
Plasma::Theme::self()->fontMetrics().height() ); }
} else
- return contentSize();
+ return geometry().size();
}
void ComicApplet::paintInterface( QPainter *p, const QStyleOptionGraphicsItem*, \
const QRect& ) {
- int imageWidth = ( mImage.isNull() ? 300 : contentSize().width() ) - 2 * \
s_arrowWidth;
- int height = ( mImage.isNull() ? 100 : contentSize().height() );
+ int imageWidth = ( mImage.isNull() ? 300 : geometry().width() ) - 2 * \
s_arrowWidth; + int height = ( mImage.isNull() ? 100 : geometry().height() );
if ( !mWebsiteUrl.isEmpty() ) {
QFontMetrics fm = Plasma::Theme::self()->fontMetrics();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic