Bug 227153

Summary: scrollbar locks in a hiding and shown circle
Product: [Applications] okular Reporter: qqqqqqqqq9
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: adriano.vilela, hanno, jjm, johannes, jtappin, lohner, mathieu.lornac, pyrophobicman, tcarter, tonywhite100, toralf.foerster
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: The infinite resizement loop is fixed

Description qqqqqqqqq9 2010-02-16 10:42:55 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Steps to reproduce

1. open a pdf document
2. Fit Width
3. Adjust the windows size so that the page nearly fits vertically fits horizontally.

Expected behaviour: The scrollbar should be shown

Actual behaviour:

a) The scrollbar is shown and the page is zoomed out,
b) Now the scrollbar is not needed anymore, therefore hidden and the page is zoomed in
c) Now a scrollbar is needed again and added, so the page is zoomed out. 
d) same as b.
This cycle continues forever
Comment 1 Albert Astals Cid 2010-04-24 22:42:22 UTC
*** Bug 235276 has been marked as a duplicate of this bug. ***
Comment 2 Albert Astals Cid 2010-05-03 12:00:19 UTC
*** Bug 235980 has been marked as a duplicate of this bug. ***
Comment 3 Albert Astals Cid 2010-05-10 20:31:33 UTC
*** Bug 237132 has been marked as a duplicate of this bug. ***
Comment 4 Albert Astals Cid 2010-05-19 22:54:47 UTC
*** Bug 237947 has been marked as a duplicate of this bug. ***
Comment 5 Pino Toscano 2010-05-22 22:38:51 UTC
*** Bug 231956 has been marked as a duplicate of this bug. ***
Comment 6 Rudolf Lohner 2010-06-09 16:15:35 UTC
Still same behaviour with
Version 0.10.4 on KDE 4.4.4
using sidux
package installed from Debian sid
Comment 7 Travers Carter 2010-06-26 10:41:49 UTC
I'm also seeing this behaviour with Okular 0.10.4 on KDE 4.4.4 (Fedora 13 x86_64 rpm)
Comment 8 Jonathan Marten 2010-06-26 16:00:33 UTC
Confirmed on current KDE trunk (kdegraphics r1139172).

Does not just happen with PDF files, but with image files too.

To reproduce:  Grab the "Experience Freedom 4.4" image from www.kde.org ("slide4.jpg" size 830x300) and open it in Okular.  Set the zoom to "Fit Width" and adjust the window width so that the display area (inside the window borders) is 835px wide (measured with KRuler).  Resize the bottom upwards until the display area is 300px high.  Continue resizing upwards very slowly until the oscillation starts, it seems to happen approximately over the range 306px to 312px.
Comment 9 Albert Astals Cid 2010-06-27 12:31:16 UTC
We can reproduce it since it was reported, we just need a patch ;-)
Comment 10 Mathieu Lornac 2010-07-16 16:37:40 UTC
Created attachment 49240 [details]
The infinite resizement loop is fixed

I would like to center the pages. but i need a hint on that one.
I don't know how to do it without quite a bit of modifications.
I was thinking to add a method in the pageViewItem class to relatively move the pages in the contentArea. (As we just have to move them on the X axis it would not be too difficult). 
I'm not sure that's the best idea.
Any suggestion on how to center the pages properly?
Comment 11 Albert Astals Cid 2010-07-21 00:24:22 UTC
SVN commit 1152393 by aacid:

There was a change of behaviour somewhere and my infinite scrollbar bug prevention code got outdated, fix it
Patch by mathieu lornac
BUGS: 227153


 M  +4 -5      pageview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1152393
Comment 12 Albert Astals Cid 2010-07-21 00:32:25 UTC
SVN commit 1152399 by aacid:

Backport r1152393 | aacid | 2010-07-20 23:24:57 +0100 (Tue, 20 Jul 2010) | 4 lines

There was a change of behaviour somewhere and my infinite scrollbar bug prevention code got outdated, fix it
Patch by mathieu lornac
BUGS: 227153


 M  +4 -5      pageview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1152399
Comment 13 Adriano Vilela 2011-11-21 23:58:11 UTC
I'm having an issue which may be related to this bug. It happens under the same circumstances as the original bug (i.e., when the window size is such that the document nearly fits both horizontally and vertically). I don't see the infinite loop problem, but I do see a loop where the document is resized a couple of times (maybe only twice). In the process, the vertical scrollbar appears and disappears. If I open a document with many pages and change pages in sequence, this happens for every page change, which is *very* annoying. Could this be related to the original bug?

I'm using Okular 0.12.5 under KDE 4.6.5 in Debian Testing.