diff options
Diffstat (limited to 'hoverwindow.cpp')
-rw-r--r-- | hoverwindow.cpp | 16 |
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); -} |