From 9b7075a7fbd3550dec0c98f6d0b4680830324085 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 30 Apr 2011 10:26:41 +0200 Subject: Fix Hotspot of X-Cursor when hovering Made Y-Offset for the cursor configurable. After switching from kwin to awesome WM the hotspot for hovering was way off. --- fileview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fileview.cpp') diff --git a/fileview.cpp b/fileview.cpp index 8874b31..f0169de 100644 --- a/fileview.cpp +++ b/fileview.cpp @@ -89,6 +89,7 @@ void FileView::readConfig(){ mHoverMovies = s.value("ui/hovermovies", true).toBool(); mWhen = s.value("ui/grabframe", "00:00:00").toString(); mHoverWin->setWindowOpacity(s.value("ui/hoveropacity", 10).toFloat() / 10.0); + mCursorOffset = s.value("ui/cursoroffset").toInt(); } void FileView::closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint){ @@ -144,7 +145,7 @@ bool FileView::event(QEvent *e){ if(!hEvent){ return exitHover(); } - QPoint hotSpot(hEvent->pos().x(), hEvent->pos().y() - SmGlobals::instance()->cursorSize().height()); + QPoint hotSpot(hEvent->pos().x(), hEvent->pos().y() + mCursorOffset); QModelIndex curIdx = indexAt(hotSpot); HoverFileType ft = None; QFileInfo curIdxInfo(curIdx.data(QFileSystemModel::FilePathRole).toString()); -- cgit v1.2.3-70-g09d2