diff options
author | Arno <am@disconnect.de> | 2010-10-23 15:09:49 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-10-23 15:09:49 +0200 |
commit | 7e0abc7cde4a9c02fabc27cc2b6506bd41f0588d (patch) | |
tree | dff223d42a9515f961ded35eaae9ceba77824580 /smglobals.h | |
parent | 9092371858356efde3e2d6d002f692308127389c (diff) | |
download | SheMov-7e0abc7cde4a9c02fabc27cc2b6506bd41f0588d.tar.gz SheMov-7e0abc7cde4a9c02fabc27cc2b6506bd41f0588d.tar.bz2 SheMov-7e0abc7cde4a9c02fabc27cc2b6506bd41f0588d.zip |
Fix hover issues
Hopefully this commit fixes all issues with hovering over items.
First, only use QCursor::pos() to determine the position of the hover
window and fix position calculation accordingly. For that SmGlobals now
return a QSize of the actual cursor size. Introduced a hoverOffeset to
HoverWindow defaulting to SmGlobals::cursorSize() + 30 to prevent a
HoverLeave event on showing the HoverWindow.
Also fixed Qt::WindowFlags of HoverWindow. We don't want the HoverWindow
to show in the taskbar or get sent to background when clicking on an
item.
Diffstat (limited to 'smglobals.h')
-rw-r--r-- | smglobals.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/smglobals.h b/smglobals.h index e1683ee..06d7b43 100644 --- a/smglobals.h +++ b/smglobals.h @@ -9,6 +9,7 @@ #define SMUBERMODELSINGLETON_H #include <QHash> +#include <QSize> class QAbstractItemModel; class PictureViewer; @@ -20,7 +21,7 @@ class SmGlobals : public QObject { static SmGlobals *instance(); QAbstractItemModel *model(const QString &which); PictureViewer *pictureViewer(); - int cursorOffset(); + QSize cursorSize(); private: SmGlobals(); @@ -29,7 +30,7 @@ class SmGlobals : public QObject { static SmGlobals *mInstance; QHash<QString, QAbstractItemModel*> mModels; PictureViewer *mPictureViewer; - int mCursorOffset; + QSize mCursorSize; }; #endif |