aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-05-06 19:58:44 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-05-06 19:58:44 +0000
commitd2b37ec8fb08805bfafb828d45c6b5e958768a77 (patch)
tree98b2d8b9c6f53473bff540d4a9d53c9b3a48c148
parent38f54a6a7144532e0cfa5a3e03a4b0af1a5c45e3 (diff)
downloadqmmp-d2b37ec8fb08805bfafb828d45c6b5e958768a77.tar.gz
qmmp-d2b37ec8fb08805bfafb828d45c6b5e958768a77.tar.bz2
qmmp-d2b37ec8fb08805bfafb828d45c6b5e958768a77.zip
fixed popup widgets size
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1714 90c681e8-e032-0410-971d-27865f9a5e38
-rw-r--r--src/plugins/General/notifier/popupwidget.cpp2
-rw-r--r--src/ui/popupwidget.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp
index 2cfca4690..c87f1fd77 100644
--- a/src/plugins/General/notifier/popupwidget.cpp
+++ b/src/plugins/General/notifier/popupwidget.cpp
@@ -110,6 +110,7 @@ void PopupWidget::showMetaData()
m_pixlabel->setFixedSize(32,32);
}
qApp->processEvents();
+ updateGeometry();
resize(sizeHint());
qApp->processEvents();
updatePosition();
@@ -127,6 +128,7 @@ void PopupWidget::showVolume(int v)
m_label1->setText("<b>" + tr("Volume:") + QString (" %1\%").arg(v)+ + "</b>");
qApp->processEvents();
+ updateGeometry();
resize(sizeHint());
qApp->processEvents();
updatePosition();
diff --git a/src/ui/popupwidget.cpp b/src/ui/popupwidget.cpp
index c8aa4e28e..08768b5f9 100644
--- a/src/ui/popupwidget.cpp
+++ b/src/ui/popupwidget.cpp
@@ -61,11 +61,11 @@ PopupWidget::PopupWidget(QWidget *parent)
m_timer = new QTimer(this);
m_timer->setInterval(delay);
m_timer->setSingleShot (true);
+ connect(m_timer, SIGNAL(timeout ()), SLOT(show()));
if(show_cover)
connect(m_timer, SIGNAL(timeout ()), SLOT(loadCover()));
else
m_pixlabel->hide();
- connect(m_timer, SIGNAL(timeout ()), SLOT(show()));
setMouseTracking(true);
}
@@ -100,6 +100,7 @@ void PopupWidget::prepare(PlayListItem *item, QPoint pos)
m_label1->setText(title);
qApp->processEvents();
updateGeometry ();
+ resize(sizeHint());
qApp->processEvents();
m_timer->start();
QRect rect = QApplication::desktop()->availableGeometry(this);
@@ -128,4 +129,8 @@ void PopupWidget::loadCover()
pix = QPixmap(":/ui_no_cover.png");
m_pixlabel->setFixedSize(m_coverSize,m_coverSize);
m_pixlabel->setPixmap(pix.scaled(m_coverSize,m_coverSize));
+ qApp->processEvents();
+ updateGeometry ();
+ resize(sizeHint());
+ qApp->processEvents();
}