summaryrefslogtreecommitdiffstats
path: root/hoverwindow.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-10-17 11:07:38 +0200
committerArno <am@disconnect.de>2010-10-17 11:07:38 +0200
commit20df1c43f5b7425810b5d16e3658f0772aae9b6c (patch)
tree778104058f0fa87a5dbeb25aa7f6f410f2b748e4 /hoverwindow.cpp
parenta3a556cc8af3433de1f8d5e22a4ba62cc029f145 (diff)
downloadSheMov-20df1c43f5b7425810b5d16e3658f0772aae9b6c.tar.gz
SheMov-20df1c43f5b7425810b5d16e3658f0772aae9b6c.tar.bz2
SheMov-20df1c43f5b7425810b5d16e3658f0772aae9b6c.zip
Revert "Let HoverWindow always stay on screen"
This reverts commit a3a556cc8af3433de1f8d5e22a4ba62cc029f145.
Diffstat (limited to 'hoverwindow.cpp')
-rw-r--r--hoverwindow.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/hoverwindow.cpp b/hoverwindow.cpp
index 100f278..8c5f227 100644
--- a/hoverwindow.cpp
+++ b/hoverwindow.cpp
@@ -7,8 +7,6 @@
#include <QHBoxLayout>
#include <QLabel>
-#include <QApplication>
-#include <QDesktopWidget>
#include "hoverwindow.h"
@@ -53,17 +51,3 @@ int HoverWindow::pixmapHeight() const{
const QPixmap *pm = mLabel->pixmap();
return pm ? pm->height() : 0;
}
-
-void HoverWindow::setPos(const QPoint &cursorPos){
- if(cursorPos.y() - height() / 2 < 0){
- move(QPoint(cursorPos.x(), 0));
- return;
- }
- QDesktopWidget *desktop = qApp->desktop();
- int desktopHeight = desktop->availableGeometry().height();
- if(cursorPos.y() + height() / 2 > desktopHeight){
- move(QPoint(cursorPos.x(), desktopHeight - height()));
- return;
- }
- move(cursorPos);
-}