Summary: | Scrolling in thumbnails view is broken | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Bernhard Jungk <fire> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sergio.pe.facebook+kde |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Patch
Second patch: corrects the scrolling bug scoll patch patch patch fixes the positionning problem |
Description
Bernhard Jungk
2009-07-27 16:15:02 UTC
You mean dragging the green bordered rectangle? Yes, I meant dragging the rectangle, scrolling the thumbnails view works. My fault, sorry. Same problem here, using KDE 4.3.2, Okular 0.9.2 It's still happening on KDE 4.4.3 (Okular 0.10.3). I recorded a video showing the problem: https://dl.dropbox.com/u/1040020/Videos/OkularThumbnails.ogv BTW vote this bug in order to be attended by the developers! I gave 10 votes to it :) Of course it's not fixed, do you see it marked as fixed? And no, you do not need to vote to make us aware of it, we are aware of it, we just do not have time to fix it, so the only thing that is going to help getting a fix faster is: * You fix it * You find someone to fix it * You somehow get our days to last more than 24 hours Take it easy, I didn't want to upset you (as you seem to be). This bug appears as unconfirmed so I thought you weren't able to reproduce it or something like that, it could be even fixed without intention (you know, "collateral effects" when programming are not only new bugs :P), so I reported that the bug persists and I even recorded a video to show you the problem in case you didn't see it. I'm sorry if I bothered you, that wasn't my intention. Ok, accept my apologies if my comment was harsh, now, where's my patch? ;-) I really tried to find this bug but I wasn't able to do it... :( I looked for it in okular/ui/thumbnailslist.cpp but I didn't found it there or it's not that obvious. I suspect it's in ThumbnailListPrivate::forwardTrack or in Document::setViewport, but I couldn't test it any further as I wasn't able to compile it!! T_T I'll try to provide you a patch, I promise, but don't expect anything :P About compiling, this might help http://okular.kde.org/download.php About the bug, the problem is in for sure not in Document:: it is either in ThumbnailListPrivate::mouseMoveEvent or in ThumbnailListPrivate::forwardTrack Thank you! I compiled it :) I fixed the bug, it was in ThumbnailListPrivate::forwardTrack. By fixing this bug, I discovered another one related to dragging the selected area in the thumbnail list, I hope I can give you a patch as soon as possible :D Can you please attach the patch? Ok, here you are :) Now there is a bug when you're dragging the highlighted area in the thumbnail list that occurs when you change from one page to another and that provokes the thumbnail list to be scrolled, so the relative position of the mouse cursor to the original grab point results in an annoying jump. Created attachment 43492 [details]
Patch
I hope this patch fixes this bug :)
The spaces and tabs may not be right, I had some problems dealing with it in Kwrite T_T
Created attachment 43495 [details]
Second patch: corrects the scrolling bug
This patch also fixes the scrolling bug, but I think it could be done better (my knowledge about Qt is very low :P).
Created attachment 49471 [details]
scoll patch
Allows you to scroll in the thumbnails as you can do in the main view window.
Works in all view modes.
Hi Mathieu, the patch looks impressive, some things i'd like you to fix though: * Minor nitpicks: * Please do not include ¿vim? modelines in the files * For enums use capital first letter, i.e. ChangePageDirection * For enum values use capital first letter too, i.e. Null * You have some weird indenting like + else if (Okular::Settings::viewMode() == Okular::Settings::EnumViewMode::FacingFirstCentered ) + { + facingFirst = 1; + reason = 2; + } please make sure the {} are on the same indenting level than the previos like if or else And now some real problems with the behaviour: * Select Fit Page, click on a page (not the first one) so you get only that page and the green border surrounds the page, now go to the thumbnail view, and press and drag down, see how the green border "jumps" up to cover the previous page. * If when dragging the current page changes from one to another on the main view there is a weird effect in which it seems that the next (or previous?) page is painted for a very small moment and then the correct page is painted again very fast Could you please investigate these issues? Created attachment 49534 [details]
patch
I fixed the behavior bugs and the malformed enumed names.
Sorry for the indentation problem, i'm having trouble configuring emacs with this coding style.
The display bug was caused by a call to setViewportPage() and then a call to set the new viewport position, i changed these calls to update the display in one time.
The other behavior bug was caused by a bad initialasation in a particular case.
I hope the patch is now correct.
I can still reproduce this problem: * Select Fit Page * Click on a page (not the first one and one outside the shaded/green area) on the thumbnail view * Press and drag down, see how the green border "jumps" up to cover the previous page When i say "Press and drag down, see how the green border "jumps" up to cover the previous page" i mean "Press in the shaded/green area and drag down, see how the green border "jumps" up to cover the previous page" Created attachment 49562 [details]
patch
Works with the thumbnail filter.
The half jump page bug is fixed.
A minor disagreement still exists, with a high zoom level, when you select a new thumbnail by clicking it, the viewport is not exactly centered at the top of the page.
I don't know if this behavior can be considered as correct or not.
I don't understand why this happens yet, the viewport repositioning is made in the function mouseReleaseEvent around the lines 770 (with the patch applied).
Created attachment 49581 [details]
fixes the positionning problem
I was using the rect()->height instead of the pixmapHeight to calculate the center position.
SVN commit 1156320 by aacid: Allow dragging in thumbnails view to drag from one page to other Patch by Mathieu Lornac Will *not* be in KDE 4.5.0 Might backport it to stable branch for some KDE 4.5.x if noone finds any problem BUGS: 201669 M +230 -82 thumbnaillist.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1156320 |