summaryrefslogtreecommitdiff
authorzecke <zecke>2002-09-10 22:35:13 (UTC)
committer zecke <zecke>2002-09-10 22:35:13 (UTC)
commitf27a003efcc655edd7100a188e5fff17b4d4c012 (patch) (side-by-side diff)
treedfdf6f4ddfd0cf899756bc2ecb503ea52ecd9984
parentaa056d16a0bed859dbe23dc93a7220181b216634 (diff)
downloadopie-f27a003efcc655edd7100a188e5fff17b4d4c012.zip
opie-f27a003efcc655edd7100a188e5fff17b4d4c012.tar.gz
opie-f27a003efcc655edd7100a188e5fff17b4d4c012.tar.bz2
Icon sizes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 41b3008..1f053f3 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -434,67 +434,67 @@ AppLnk& AppLnk::operator=(const AppLnk &copy)
d->mCatList = copy.d->mCatList;
d->mPixmaps = copy.d->mPixmaps;
return *this;
}
/*!
protected internally to share code
should I document that at all?
I don't know the TT style for that
*/
const QPixmap& AppLnk::pixmap( int pos, int size ) const {
if ( d->mPixmaps[pos].isNull() ) {
AppLnk* that = (AppLnk*)this;
if ( mIconFile.isEmpty() ) {
MimeType mt(type());
that->d->mPixmaps[pos] = mt.pixmap();
if ( that->d->mPixmaps[pos].isNull() )
that->d->mPixmaps[pos].convertFromImage(
Resource::loadImage("UnknownDocument")
.smoothScale( size, size ) );
return that->d->mPixmaps[pos];
}
QImage unscaledIcon = Resource::loadImage( that->mIconFile );
if ( unscaledIcon.isNull() ) {
qDebug( "Cannot find icon: %s", that->mIconFile.latin1() );
that->d->mPixmaps[pos].convertFromImage(
Resource::loadImage("UnknownDocument")
.smoothScale( size, size ) );
} else {
that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) );
that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) );
}
- return that->d->mPixmaps[0];
+ return that->d->mPixmaps[pos];
}
- return mPixmap;
+ return d->mPixmaps[pos];
}
/*!
Returns a small pixmap associated with the application.
\sa bigPixmap() setIcon()
*/
const QPixmap& AppLnk::pixmap() const
{
if ( d->mPixmaps[0].isNull() ) {
return pixmap(AppLnkPrivate::Normal, smallSize );
}
return d->mPixmaps[0];
}
/*!
Returns a large pixmap associated with the application.
\sa pixmap() setIcon()
*/
const QPixmap& AppLnk::bigPixmap() const
{
if ( d->mPixmaps[1].isNull() ) {
return pixmap( AppLnkPrivate::Big, bigSize );
}
return mBigPixmap;
}
/*!
Returns the type of the AppLnk. For applications, games and
settings the type is \c Application; for documents the type is the
document's MIME type.