Hey,
Here's the fix for the pan icon showing up on a double click. Seems to me
the timer may last a bit too long though. Yeah? No? Anyway, criticism
is certainly appreciated.
I also noticed what seems to be a bug with pop up notes. When my zoom is
at 100% the whole of my document fits in the window. Great. Pop up notes
seem to behave normally.
However if I'm zoomed in enough that I'm able to scroll around in my
document (or perhaps if a document just has more than one page), that's
when I see a problem. If I open a pop up note and move it around a bit, I
get this strangeness:
http://www.cs.ucr.edu/~gkaukola/okularbug.png
I'll see if I can't pin things down further.
Cheers,
Glen Kaukola
Index: okular/ui/pageview.cpp
===================================================================
--- okular/ui/pageview.cpp (revision 1107218)
+++ okular/ui/pageview.cpp (working copy)
@@ -145,6 +145,9 @@
QPoint dragScrollVector;
QTimer dragScrollTimer;
+ // left click depress
+ QTimer leftClickTimer;
+
// actions
KAction * aRotateClockwise;
KAction * aRotateCounterClockwise;
@@ -302,6 +305,7 @@
connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(slotRequestVisiblePixmaps(int)));
connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(slotRequestVisiblePixmaps(int)));
connect( &d->dragScrollTimer, SIGNAL(timeout()), this, SLOT(slotDragScroll()) );
+ connect( &d->leftClickTimer, SIGNAL(timeout()), this, SLOT(slotShowSizeAllCursor()) );
// set a corner button to resize the view to the page size
// QPushButton * resizeButton = new QPushButton( viewport() );
@@ -1652,7 +1656,7 @@
{
d->mouseGrabPos = d->mouseOnRect ? QPoint() : d->mousePressPos;
if ( !d->mouseOnRect )
- setCursor( Qt::SizeAllCursor );
+ d->leftClickTimer.start(QApplication::doubleClickInterval() + 10);
}
}
else if ( rightButton )
@@ -1713,6 +1717,8 @@
// stop the drag scrolling
d->dragScrollTimer.stop();
+ d->leftClickTimer.stop();
+
// don't perform any mouse action when no document is shown..
if ( d->items.isEmpty() )
{
@@ -3272,6 +3278,11 @@
d->messageWindow->display( i18n( "Welcome" ), PageViewMessage::Info, 2000 );
}
+void PageView::slotShowSizeAllCursor()
+{
+ setCursor( Qt::SizeAllCursor );
+}
+
void PageView::slotZoom()
{
setFocus();
Index: okular/ui/pageview.h
===================================================================
--- okular/ui/pageview.h (revision 1107218)
+++ okular/ui/pageview.h (working copy)
@@ -190,6 +190,8 @@
void slotDragScroll();
// show the welcome message
void slotShowWelcome();
+ // activated by left click timer
+ void slotShowSizeAllCursor();
// connected to local actions (toolbar, menu, ..)
void slotZoom();
_______________________________________________
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel