From 9bc167e621ccc1e802e2f8c16e8879ec7681fda2 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 27 Apr 2008 12:35:05 +0000 Subject: new application icons (author: Andrey Andreev) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@353 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/notifier/popupwidget.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/plugins/General/notifier/popupwidget.cpp') diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp index 033de8755..f9c331e50 100644 --- a/src/plugins/General/notifier/popupwidget.cpp +++ b/src/plugins/General/notifier/popupwidget.cpp @@ -35,13 +35,20 @@ PopupWidget::PopupWidget(const SongInfo &song, QWidget *parent) setWindowFlags(Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint); setFrameStyle(QFrame::Box | QFrame::Plain); - QVBoxLayout *layout = new QVBoxLayout(this); QString title = song.title(); title.append(" "); if (!song.isStream()) title.append(QString("(%1:%2)").arg(song.length()/60).arg(song.length()%60, 2, 10, QChar('0'))); + + QHBoxLayout *hlayout = new QHBoxLayout(this); + QLabel *pixlabel = new QLabel(this); + pixlabel->setPixmap(QPixmap(":/notifier_icon.png")); + pixlabel->setFixedSize(32,32); + hlayout->addWidget(pixlabel); + + QVBoxLayout *vlayout = new QVBoxLayout(this); QLabel *label1 = new QLabel(""+title+"", this); - layout->addWidget(label1); + vlayout->addWidget(label1); QString info = song.artist(); if (!info.isEmpty() && !song.album().isEmpty()) @@ -49,9 +56,11 @@ PopupWidget::PopupWidget(const SongInfo &song, QWidget *parent) if (!info.isEmpty()) { QLabel *label2 = new QLabel(info, this); - layout->addWidget(label2); + vlayout->addWidget(label2); } - setLayout(layout); + + hlayout->addLayout (vlayout); + setLayout(hlayout); resize(sizeHint()); QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); settings.beginGroup("Notifier"); -- cgit v1.2.3-13-gbd6f