aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/notifier/popupwidget.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-05-31 09:27:58 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-05-31 09:27:58 +0000
commit6c988486d713b05f53fe639f4963f3eb3263d2bb (patch)
tree5ee75e4595c29ef9b73b577af325633e2fcc1afd /src/plugins/General/notifier/popupwidget.cpp
parentaecb3aac92ced1ef2c03765ffe33055a2debc556 (diff)
downloadqmmp-6c988486d713b05f53fe639f4963f3eb3263d2bb.tar.gz
qmmp-6c988486d713b05f53fe639f4963f3eb3263d2bb.tar.bz2
qmmp-6c988486d713b05f53fe639f4963f3eb3263d2bb.zip
notifier plugin: fixed notification window position
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@961 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/notifier/popupwidget.cpp')
-rw-r--r--src/plugins/General/notifier/popupwidget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp
index 26712a93b..b3653b95d 100644
--- a/src/plugins/General/notifier/popupwidget.cpp
+++ b/src/plugins/General/notifier/popupwidget.cpp
@@ -127,15 +127,15 @@ void PopupWidget::showVolume(int v)
void PopupWidget::updatePosition()
{
//calculate widget position
- int x = 5, y = 5;
- QSize desktopSize = QApplication::desktop()->size();
+ QRect desktopRect = QApplication::desktop()->availableGeometry();
+ int x = desktopRect.x() + 5, y = desktopRect.y() + 5;
if (m_pos == LEFT || m_pos == RIGHT || m_pos == CENTER)
- y = desktopSize.height()/2 - height()/2;
+ y = desktopRect.y() + desktopRect.height()/2 - height()/2 + 5;
else if (m_pos == BOTTOMLEFT || m_pos == BOTTOM || m_pos == BOTTOMRIGHT)
- y = desktopSize.height() - height() - 5;
+ y = desktopRect.y() + desktopRect.height() - height() - 5;
if (m_pos == TOP || m_pos == BOTTOM || m_pos == CENTER)
- x = desktopSize.width()/2 - width()/2;
+ x = desktopRect.x() + desktopRect.width()/2 - width()/2;
else if (m_pos == TOPRIGHT || m_pos == RIGHT || m_pos == BOTTOMRIGHT)
- x = desktopSize.width() - width() - 5;
+ x = desktopRect.x() + desktopRect.width() - width() - 5;
move (x,y);
}