From d2b37ec8fb08805bfafb828d45c6b5e958768a77 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 6 May 2010 19:58:44 +0000 Subject: fixed popup widgets size git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1714 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/notifier/popupwidget.cpp | 2 ++ src/ui/popupwidget.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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("" + tr("Volume:") + QString (" %1\%").arg(v)+ + ""); 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(); } -- cgit v1.2.3-13-gbd6f