~ubuntu-branches/ubuntu/maverick/kdemultimedia/maverick-proposed

« back to all changes in this revision

Viewing changes to juk/systemtray.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-02-27 14:20:08 UTC
  • mfrom: (1.2.40 upstream)
  • Revision ID: james.westby@ubuntu.com-20100227142008-ebyk0usvqo08259o
Tags: 4:4.4.1-0ubuntu1
* New upstream bugfix release:
  - Bump build-depend versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
    if(!m_player->playing())
213
213
        return;
214
214
 
215
 
    QPixmap cover = m_player->playingFile().coverInfo()->pixmap(CoverInfo::Thumbnail);
 
215
    QPixmap cover = m_player->playingFile().coverInfo()->pixmap(CoverInfo::FullSize);
216
216
 
217
217
    setOverlayIconByName("media-playback-start");
218
218
    setToolTip(m_player->playingString(), cover);
477
477
    if(tip.isEmpty())
478
478
        KStatusNotifierItem::setToolTip("juk", i18n("JuK"), QString());
479
479
    else {
480
 
        QPixmap myCover = cover;
481
 
        if(cover.isNull())
 
480
        QPixmap myCover;
 
481
        if(cover.isNull()) {
482
482
            myCover = DesktopIcon("juk");
 
483
        } else {
 
484
            //Scale to proper icon size, otherwise KStatusNotifierItem will show an unknown icon
 
485
            int iconSize = KIconLoader::global()->currentSize(KIconLoader::Desktop);
 
486
            myCover = cover.scaled(iconSize, iconSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
 
487
        }
483
488
 
484
489
        QString html = QString("%1").arg(tip);
485
490
        html.replace(" ", " ");