Losing context in continuous mode

Asked by Ildar Nizamov

Version 0.4.7
Reading pdf in single page + continuous mode. Apps bottom edge split last string at two parts, you see it's top part. "Skip forward" action (PageDown) push you exactly at bottop edge and now you see only bottom part of string, but never a whole line. Skip backward behaves the same. I've duct taped it with:

diff -r 8d93ddbb578d documentview.cpp
--- a/documentview.cpp Sun Jan 31 11:42:00 2016 +0300
+++ b/documentview.cpp Sun Jan 31 11:42:29 2016 +0300
@@ -1183,6 +1183,15 @@
             }
         }

+ if(m_continuousMode) {
+
+ const int gap = 50;
+ if(maskedKey == Qt::Key_PageUp && m_currentPage != 1)
+ verticalScrollBar()->setValue(verticalScrollBar()->value()+gap);
+ else if(maskedKey == Qt::Key_PageDown && m_currentPage != m_layout->currentPage(m_pages.count()))
+ verticalScrollBar()->setValue(verticalScrollBar()->value()-gap);
+ }
+
         if(!m_continuousMode)
         {
             if(maskedKey == Qt::Key_PageUp && verticalScrollBar()->value() == verticalScrollBar()->minimum() && m_currentPage != 1)

Question information

Language:
English Edit question
Status:
Solved
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Solved by:
Ildar Nizamov
Solved:
Last query:
Last reply:
Revision history for this message
Adam Reichold (adamreichold) said :
#1

Hello Ildar,

I think the behaviour you describe is the default for all scrolled views in Qt and I would prefer not to get even more intrusive with this. Also in this particular case, I think a simple workaround would be to scroll up/down after jumping forward/backward a whole screen you just continuous scroll instead of jumping whole screens.

Best regards, Adam.

Revision history for this message
Ildar Nizamov (jedi-2b3) said :
#2

Ok.
Thanks for great app!