mouse pointer (3)
Carles Pina i Estany <[email protected]>
| Newsgroups | gmane.comp.kde.gwenview |
|---|---|
| Message-ID | <[email protected]> |
Hello, This patch substitutes other patch (apply only this one). Other patch had a problem, and other patch was not hidding the cursor if user was browsing faster than 5 seconds (in each photo counter was restarting) I recommend to disable, in configuration - full screen: "Show busy mouse pointer when loading an image". Else cursor is blinking :-) My apologizes to send 3 patches for same thing :-) (but now I was showing photos and I've seen some problem) -- Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Gwenview-general mailing list Gwenview-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/gwenview-general
hide_pointer3.patch
(text/x-diff, 2.3 KB)
Index: app/mainwindow.cpp
===================================================================
--- app/mainwindow.cpp (revision 699377)
+++ app/mainwindow.cpp (working copy)
@@ -518,13 +518,16 @@
void MainWindow::slotImageLoading() {
if (FullScreenConfig::showBusyPtr() || !mToggleFullScreen->isChecked()) {
- kapp->setOverrideCursor(KCursor::workingCursor(), true /* replace */);
+ kapp->setOverrideCursor(KCursor::workingCursor());
}
}
void MainWindow::slotImageLoaded() {
- kapp->restoreOverrideCursor();
+ // Reciproc of slotImageLoading
+ if (FullScreenConfig::showBusyPtr() || !mToggleFullScreen->isChecked()) {
+ kapp->restoreOverrideCursor();
+ }
updateStatusInfo();
updateImageActions();
updateLocationURL();
Index: gvcore/imageviewcontroller.cpp
===================================================================
--- gvcore/imageviewcontroller.cpp (revision 699377)
+++ gvcore/imageviewcontroller.cpp (working copy)
@@ -98,7 +98,9 @@
ImageView* mImageView;
KActionPtrList mImageViewActions;
+ // Hide cursor stuff
QTimer* mAutoHideTimer;
+ bool mCursorHidden;
KParts::ReadOnlyPart* mPlayerPart;
@@ -269,6 +271,7 @@
d->mDocument=document;
d->mActionCollection=actionCollection;
d->mAutoHideTimer=new QTimer(this);
+ d->mCursorHidden=false;
d->mContainer=new QWidget(parent);
d->mContainer->setMinimumWidth(1); // Make sure we can resize the toolbar smaller than its minimum size
@@ -349,6 +352,7 @@
} else {
d->mAutoHideTimer->stop();
QApplication::restoreOverrideCursor();
+ d->mCursorHidden=false;
}
d->mToolBar->setHidden(d->mFullScreen);
@@ -394,6 +398,7 @@
QWidget* widget = KApplication::kApplication()->activeWindow();
if (!widget || !widget->inherits("QDialog")) {
QApplication::setOverrideCursor(blankCursor);
+ d->mCursorHidden=true;
}
}
@@ -429,8 +434,20 @@
if (!isAChildOfStack) return false;
d->updateFullScreenBarPosition();
- QApplication::restoreOverrideCursor();
- d->restartAutoHideTimer();
+
+ if (event->type()==QEvent::MouseMove) {
+ d->mCursorHidden=false;
+ d->restartAutoHideTimer();
+
+ }
+ if (d->mCursorHidden==true) {
+ QApplication::setOverrideCursor(blankCursor,true);
+ }
+ else {
+ QApplication::restoreOverrideCursor();
+ d->mCursorHidden=false;
+ }
+
return false;
}