From 20df1c43f5b7425810b5d16e3658f0772aae9b6c Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 17 Oct 2010 11:07:38 +0200 Subject: Revert "Let HoverWindow always stay on screen" This reverts commit a3a556cc8af3433de1f8d5e22a4ba62cc029f145. --- hoverwindow.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'hoverwindow.cpp') diff --git a/hoverwindow.cpp b/hoverwindow.cpp index 100f278..8c5f227 100644 --- a/hoverwindow.cpp +++ b/hoverwindow.cpp @@ -7,8 +7,6 @@ #include #include -#include -#include #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); -} -- cgit v1.2.3-70-g09d2