10 August, 2009

Little gem!

While reading some scientific papers with KPDF Okular I used my mouse to grab the paper and scroll.

Annoyingly, you have to click and drag all the time. Then, after reading intensively for some time, I suddenly realized I hadn't used my mousebutton for a while. Yet I read through a few pages already. Looking for my mouse cursor, I noticed it was on top of the screen. ???

So - I drag the page down, continue to drag even while reaching the bottom of the screen and lo and behold! Once you cross the bottom of the page, the mouse cursor appears on top of the screen and you can just continue to drag! I used a great feature and didn't even notice...

I've admired Okular since it was KPDF. It's clean interface, speed, powerful search capabilities and ease of use were a hallmark of Free Software. To me, Okular, while 'just a PDF reader' was clearly miles ahead of especially the proprietary competition. A showcase of just how much better Free Software can be. The lovely auto scrolling (SHIFT-Arrow down; you can now use SHIFT[arrow] to increase and decrease the speed!), easy tekst selection, the annotation support - throughout the years I've enjoyed it. Not to mention how the Okular team provides us with a great example of cross-desktop collaboration on the Poppler library.

And yet, after being a faithful user for so long, the developers still surprise me. Way to go, Okular devs!

(
For the dutch readers, this prompted me to add an okular section to the KDE-tips in the dutch Mandrivaclub Wiki. Showing my love for both Mandriva and KDE :D
http://www.mandrivaclub.nl/wiki/index.php/KDE_Tips
)

5 comments:

  1. Having a trackpoint on the laptop I also very much appreciate this scrolling-feature, and in fact believe it would be very beneficial for Gwenview as well.
    Maybe Okular already has an own class for this or it's not much code and it can be integrated in other apps?

    ReplyDelete
  2. Heh, I also discovered that feature by accident and went "woooo". Although I much prefer to navigate with keyboard [space/shift-space, j/k (custom shortcuts)].

    ReplyDelete
  3. I knew that Shift+Arrow scrolling is possible in konqueror, but not that you can use it in okular, too. Are there other apps that support this?

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. This feature has been there since a long time (I added it to kpdf 0.5 ;-).

    It's a really quick hack on 'mouseMoveEvent(QMouseEvent * event)' and you can do it with this simple snippet (a little screwed up by html):

    QPoint mousePos = event->globalPos();

    // wrap mouse from top to bottom
    QRect mouseContainer = KGlobalSettings::desktopGeometry( this );
    if ( mousePos.y() <= mouseContainer.top() + 4 &&
    verticalScrollBar()->value() < verticalScrollBar()->maximum() - 10 )
    {
    mousePos.setY( mouseContainer.bottom() - 5 );
    QCursor::setPos( mousePos );
    }
    // wrap mouse from bottom to top
    else if ( mousePos.y() >= mouseContainer.bottom() - 4 &&
    verticalScrollBar()->value() > 10 )
    {
    mousePos.setY( mouseContainer.top() + 5 );
    QCursor::setPos( mousePos );
    }

    Yes, gwenview and other 'scrollview'/graphicsview based apps may use this ;-)

    ReplyDelete

Say something smart and be polite please!