diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-04-27 12:16:50 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-04-27 12:16:50 +0000 |
| commit | cb8811646038a08f2c240c8c6ea80c0507618949 (patch) | |
| tree | bf0808418fefacdee3ffbbbaf80bab9cb6ed8092 | |
| parent | 430bd49abd364090fee9afe83c6b1c98e8d71e02 (diff) | |
| download | qmmp-cb8811646038a08f2c240c8c6ea80c0507618949.tar.gz qmmp-cb8811646038a08f2c240c8c6ea80c0507618949.tar.bz2 qmmp-cb8811646038a08f2c240c8c6ea80c0507618949.zip | |
fixed popup widget position (Closes issue 288)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1696 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/ui/popupwidget.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ui/popupwidget.cpp b/src/ui/popupwidget.cpp index d670de459..c8aa4e28e 100644 --- a/src/ui/popupwidget.cpp +++ b/src/ui/popupwidget.cpp @@ -21,6 +21,7 @@ #include <QVBoxLayout> #include <QLabel> #include <QApplication> +#include <QDesktopWidget> #include <QTimer> #include <QSettings> #include <QApplication> @@ -92,7 +93,7 @@ void PopupWidget::prepare(PlayListItem *item, QPoint pos) m_timer->stop(); return; } - move(pos); + QString title = m_template; MetaDataFormatter f(title); title = f.parse(item); @@ -101,6 +102,10 @@ void PopupWidget::prepare(PlayListItem *item, QPoint pos) updateGeometry (); qApp->processEvents(); m_timer->start(); + QRect rect = QApplication::desktop()->availableGeometry(this); + if(pos.x() + width() > rect.x() + rect.width()) + pos.rx() -= width(); + move(pos); } void PopupWidget::deactivate() |
