From 6c988486d713b05f53fe639f4963f3eb3263d2bb Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 31 May 2009 09:27:58 +0000 Subject: 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 --- src/plugins/General/notifier/popupwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/plugins/General/notifier/popupwidget.cpp') 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); } -- cgit v1.2.3-13-gbd6f