author | zecke <zecke> | 2002-09-10 22:35:13 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 22:35:13 (UTC) |
commit | f27a003efcc655edd7100a188e5fff17b4d4c012 (patch) (unidiff) | |
tree | dfdf6f4ddfd0cf899756bc2ecb503ea52ecd9984 | |
parent | aa056d16a0bed859dbe23dc93a7220181b216634 (diff) | |
download | opie-f27a003efcc655edd7100a188e5fff17b4d4c012.zip opie-f27a003efcc655edd7100a188e5fff17b4d4c012.tar.gz opie-f27a003efcc655edd7100a188e5fff17b4d4c012.tar.bz2 |
Icon sizes
-rw-r--r-- | library/applnk.cpp | 4 |
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 | |||
@@ -442,51 +442,51 @@ AppLnk& AppLnk::operator=(const AppLnk ©) | |||
442 | I don't know the TT style for that | 442 | I don't know the TT style for that |
443 | */ | 443 | */ |
444 | const QPixmap& AppLnk::pixmap( int pos, int size ) const { | 444 | const QPixmap& AppLnk::pixmap( int pos, int size ) const { |
445 | if ( d->mPixmaps[pos].isNull() ) { | 445 | if ( d->mPixmaps[pos].isNull() ) { |
446 | AppLnk* that = (AppLnk*)this; | 446 | AppLnk* that = (AppLnk*)this; |
447 | if ( mIconFile.isEmpty() ) { | 447 | if ( mIconFile.isEmpty() ) { |
448 | MimeType mt(type()); | 448 | MimeType mt(type()); |
449 | that->d->mPixmaps[pos] = mt.pixmap(); | 449 | that->d->mPixmaps[pos] = mt.pixmap(); |
450 | if ( that->d->mPixmaps[pos].isNull() ) | 450 | if ( that->d->mPixmaps[pos].isNull() ) |
451 | that->d->mPixmaps[pos].convertFromImage( | 451 | that->d->mPixmaps[pos].convertFromImage( |
452 | Resource::loadImage("UnknownDocument") | 452 | Resource::loadImage("UnknownDocument") |
453 | .smoothScale( size, size ) ); | 453 | .smoothScale( size, size ) ); |
454 | return that->d->mPixmaps[pos]; | 454 | return that->d->mPixmaps[pos]; |
455 | } | 455 | } |
456 | QImage unscaledIcon = Resource::loadImage( that->mIconFile ); | 456 | QImage unscaledIcon = Resource::loadImage( that->mIconFile ); |
457 | if ( unscaledIcon.isNull() ) { | 457 | if ( unscaledIcon.isNull() ) { |
458 | qDebug( "Cannot find icon: %s", that->mIconFile.latin1() ); | 458 | qDebug( "Cannot find icon: %s", that->mIconFile.latin1() ); |
459 | that->d->mPixmaps[pos].convertFromImage( | 459 | that->d->mPixmaps[pos].convertFromImage( |
460 | Resource::loadImage("UnknownDocument") | 460 | Resource::loadImage("UnknownDocument") |
461 | .smoothScale( size, size ) ); | 461 | .smoothScale( size, size ) ); |
462 | } else { | 462 | } else { |
463 | that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); | 463 | that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); |
464 | that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); | 464 | that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); |
465 | } | 465 | } |
466 | return that->d->mPixmaps[0]; | 466 | return that->d->mPixmaps[pos]; |
467 | } | 467 | } |
468 | return mPixmap; | 468 | return d->mPixmaps[pos]; |
469 | } | 469 | } |
470 | 470 | ||
471 | /*! | 471 | /*! |
472 | Returns a small pixmap associated with the application. | 472 | Returns a small pixmap associated with the application. |
473 | 473 | ||
474 | \sa bigPixmap() setIcon() | 474 | \sa bigPixmap() setIcon() |
475 | */ | 475 | */ |
476 | const QPixmap& AppLnk::pixmap() const | 476 | const QPixmap& AppLnk::pixmap() const |
477 | { | 477 | { |
478 | if ( d->mPixmaps[0].isNull() ) { | 478 | if ( d->mPixmaps[0].isNull() ) { |
479 | return pixmap(AppLnkPrivate::Normal, smallSize ); | 479 | return pixmap(AppLnkPrivate::Normal, smallSize ); |
480 | } | 480 | } |
481 | return d->mPixmaps[0]; | 481 | return d->mPixmaps[0]; |
482 | } | 482 | } |
483 | 483 | ||
484 | /*! | 484 | /*! |
485 | Returns a large pixmap associated with the application. | 485 | Returns a large pixmap associated with the application. |
486 | 486 | ||
487 | \sa pixmap() setIcon() | 487 | \sa pixmap() setIcon() |
488 | */ | 488 | */ |
489 | const QPixmap& AppLnk::bigPixmap() const | 489 | const QPixmap& AppLnk::bigPixmap() const |
490 | { | 490 | { |
491 | if ( d->mPixmaps[1].isNull() ) { | 491 | if ( d->mPixmaps[1].isNull() ) { |
492 | return pixmap( AppLnkPrivate::Big, bigSize ); | 492 | return pixmap( AppLnkPrivate::Big, bigSize ); |