diff options
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/General/notifier/popupwidget.cpp | 12 |
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); } |
