diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-04-27 12:35:05 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-04-27 12:35:05 +0000 |
| commit | 9bc167e621ccc1e802e2f8c16e8879ec7681fda2 (patch) | |
| tree | 6edc86f1281ebab32dea2955e3961c0c1db370ac /src/plugins/General/notifier/popupwidget.cpp | |
| parent | 7e58dddb0028b8326c36038d2a4d432f72ae8d3e (diff) | |
| download | qmmp-9bc167e621ccc1e802e2f8c16e8879ec7681fda2.tar.gz qmmp-9bc167e621ccc1e802e2f8c16e8879ec7681fda2.tar.bz2 qmmp-9bc167e621ccc1e802e2f8c16e8879ec7681fda2.zip | |
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
Diffstat (limited to 'src/plugins/General/notifier/popupwidget.cpp')
| -rw-r--r-- | src/plugins/General/notifier/popupwidget.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
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("<b>"+title+"</b>", 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"); |
