summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorMatthew Olsson <matthewcolsson@gmail.com>2022-03-27 09:14:09 -0700
committerAndreas Kling <kling@serenityos.org>2022-04-04 14:59:37 +0200
commitc39718ca81b2b6c5023500c41dca6af659223771 (patch)
tree679fad86031e039c6289168e21cd6063f1a1887f /Userland
parentb2f79a74d474a8c6751ec8d30e72e88b2bdb3703 (diff)
downloadserenity-c39718ca81b2b6c5023500c41dca6af659223771.zip
PDFViewer: Don't change pages on horizontal scroll
This was a bit jarring, and didn't align with the behavior of other PDF renderers.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/PDFViewer/PDFViewer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/PDFViewer/PDFViewer.cpp b/Userland/Applications/PDFViewer/PDFViewer.cpp
index eedee72d24..049447baab 100644
--- a/Userland/Applications/PDFViewer/PDFViewer.cpp
+++ b/Userland/Applications/PDFViewer/PDFViewer.cpp
@@ -126,7 +126,7 @@ void PDFViewer::mousewheel_event(GUI::MouseEvent& event)
if (scrolled_down) {
if (scrollbar.value() == scrollbar.max()) {
- if (m_current_page_index < m_document->get_page_count() - 1) {
+ if (m_current_page_index < m_document->get_page_count() - 1 && !event.shift()) {
m_current_page_index++;
if (on_page_change)
on_page_change(m_current_page_index);
@@ -137,7 +137,7 @@ void PDFViewer::mousewheel_event(GUI::MouseEvent& event)
}
} else {
if (scrollbar.value() == 0) {
- if (m_current_page_index > 0) {
+ if (m_current_page_index > 0 && !event.shift()) {
m_current_page_index--;
if (on_page_change)
on_page_change(m_current_page_index);