You are not logged in.
Recently I updated the system, and among other things okular 19.12.3-3 was upgraded to 20.04.0-1. In okular, 'Space' key is mapped to 'Scroll Page Down' action, which before upgrade scrolled by screenfulls, as expected. Now after the upgrade 'Space' is still mapped to the same action, but now instead of scrolling by screenfulls it scrolls like arrow down key, but slower and smoother. Trying to map other keys to 'Scroll Page Down' action doesn't help, the new key still scrolls in the same strange way as the default key.
'Scroll Page Up' (which is mapped to 'B' on my machine) has the same problem, and now scrolls similarly to arrow up key (but smoother).
How it is possible to scroll by screenfulls after the upgrade?
P.S.: PgUp/PgDn keys also scroll in a strange way described above
Last edited by vt220 (2020-05-11 14:33:49)
Offline
I am experiencing the problem with PgUp/PgDn keys, and it is horrendously inefficient when it comes to quick keyboard navigation around a document.
Does anyone know how to restore the old behavior? PgUp/PgDn used to be by fixed increments and almost instantaneous; now the increments are nonuniform and are "smooth" as vt220 says, taking ~0.5 seconds each. Holding down PgDn is no longer a fast way to run through many pages. As vt220 says, 'space' is also smoothed out and slowed down.
I have downgraded Okular (20.04.1-1 => 19.12.3-3) to get by temporarily.
Offline
I opened a bug report: https://bugs.kde.org/show_bug.cgi?id=421822
Offline
I had the exact same issue. The following fix worked for me:
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 50f8073ec..9bdb778ec 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -5375,7 +5376,7 @@ void PageView::slotScrollUp( int nSteps )
d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0,-100*nSteps), 0);
}else{
if(d->scroller->finalPosition().y() > verticalScrollBar()->minimum())
- d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, -verticalScrollBar()->rect().height() ));
+ d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, -verticalScrollBar()->rect().height() ), 0);
}
}
else if ( d->document->currentPage() > 0 )
@@ -5403,7 +5404,7 @@ void PageView::slotScrollDown( int nSteps )
d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0,100*nSteps), 0);
}else{
if(d->scroller->finalPosition().y() < verticalScrollBar()->maximum())
- d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, verticalScrollBar()->rect().height() ));
+ d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, verticalScrollBar()->rect().height() ), 0);
}
}
else if ( (int)d->document->currentPage() < d->items.count() - 1 )
The second argument of scrollTo is the animation speed, which I've set to zero.
While we're on the subject, there were a few other changes introduced in that commit that, at least I personally, find annoying. This fix disables kinetic scrolling:
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 50f8073ec..9bdb778ec 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -447,7 +447,7 @@ PageView::PageView( QWidget *parent, Okular::Document *document )
QScrollerProperties prop;
prop.setScrollMetric(QScrollerProperties::DecelerationFactor, 0.3);
- prop.setScrollMetric(QScrollerProperties::MaximumVelocity, 1);
+ prop.setScrollMetric(QScrollerProperties::MaximumVelocity, 0);
prop.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff);
prop.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff);
d->scroller->setScrollerProperties(prop);
and this one fixes the zoom issue when the view mode is Facing Pages:
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 50f8073ec..9bdb778ec 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -4097,7 +4097,7 @@ double PageView::zoomFactorFitMode( ZoomMode mode )
const bool facingCentered = Okular::Settings::viewMode() == Okular::Settings::EnumViewMode::FacingFirstCentered || (Okular::Settings::viewMode() == Okular::Settings::EnumViewMode::Facing && pageCount == 1);
const bool overrideCentering = facingCentered && pageCount < 3;
const int nCols = overrideCentering ? 1 : viewColumns();
- const double colWidth = viewport()->width() / static_cast<double>(nCols) - kcolWidthMargin;
+ const int colWidth = viewport()->width() / nCols - kcolWidthMargin;
const double rowHeight = viewport()->height() - krowHeightMargin;
const PageViewItem * currentItem = d->items[ qMax( 0, (int)d->document->currentPage()) ];
// prevent segmentation fault when opening a new document;
Raul Laasner
Offline
I had the exact same issue. The following fix worked for me:
The fix didn't work on my machine - I applied the first two diffs to a tip of a master branch (the zoom issue fix was already present there), and while the kinetic scrolling indeed disappeared, the problem with the scrolling still exists.
Offline
Disabling kinetic scrolling would be fantastic. I can see where your changes go in the Okular git project, but how do I implement those changes for Arch linux package installation? The directory structure of KDE's Okular git project is different from Arch's Okular package tarball and I cannot find "ui/pageview.cpp" in the Arch package.
I had the exact same issue. The following fix worked for me:
diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 50f8073ec..9bdb778ec 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -5375,7 +5376,7 @@ void PageView::slotScrollUp( int nSteps ) d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0,-100*nSteps), 0); }else{ if(d->scroller->finalPosition().y() > verticalScrollBar()->minimum()) - d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, -verticalScrollBar()->rect().height() )); + d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, -verticalScrollBar()->rect().height() ), 0); } } else if ( d->document->currentPage() > 0 ) @@ -5403,7 +5404,7 @@ void PageView::slotScrollDown( int nSteps ) d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0,100*nSteps), 0); }else{ if(d->scroller->finalPosition().y() < verticalScrollBar()->maximum()) - d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, verticalScrollBar()->rect().height() )); + d->scroller->scrollTo(d->scroller->finalPosition() + QPoint(0, verticalScrollBar()->rect().height() ), 0); } } else if ( (int)d->document->currentPage() < d->items.count() - 1 )
The second argument of scrollTo is the animation speed, which I've set to zero.
While we're on the subject, there were a few other changes introduced in that commit that, at least I personally, find annoying. This fix disables kinetic scrolling:
diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 50f8073ec..9bdb778ec 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -447,7 +447,7 @@ PageView::PageView( QWidget *parent, Okular::Document *document ) QScrollerProperties prop; prop.setScrollMetric(QScrollerProperties::DecelerationFactor, 0.3); - prop.setScrollMetric(QScrollerProperties::MaximumVelocity, 1); + prop.setScrollMetric(QScrollerProperties::MaximumVelocity, 0); prop.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); prop.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); d->scroller->setScrollerProperties(prop);
and this one fixes the zoom issue when the view mode is Facing Pages:
diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 50f8073ec..9bdb778ec 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -4097,7 +4097,7 @@ double PageView::zoomFactorFitMode( ZoomMode mode ) const bool facingCentered = Okular::Settings::viewMode() == Okular::Settings::EnumViewMode::FacingFirstCentered || (Okular::Settings::viewMode() == Okular::Settings::EnumViewMode::Facing && pageCount == 1); const bool overrideCentering = facingCentered && pageCount < 3; const int nCols = overrideCentering ? 1 : viewColumns(); - const double colWidth = viewport()->width() / static_cast<double>(nCols) - kcolWidthMargin; + const int colWidth = viewport()->width() / nCols - kcolWidthMargin; const double rowHeight = viewport()->height() - krowHeightMargin; const PageViewItem * currentItem = d->items[ qMax( 0, (int)d->document->currentPage()) ]; // prevent segmentation fault when opening a new document;
Offline
but how do I implement those changes for Arch linux package installation?
You can't make those changes at installation time .
Get the official PKGBUILD for okular[1] , edit it to add the patches in a prepare() function , run makepkg to build it.
If you're unfamiliar with building packages you'll have to do a lot of reading .
Start wih https://wiki.archlinux.org/index.php/Arch_Build_System and make sure to check all links , especially the ones at top right of that page.
Last edited by Lone_Wolf (2020-06-22 13:18:50)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline