summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-14 10:28:58 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-14 10:29:21 +0200
commit69718dc5b9359629ae54d47571813fd4a0277206 (patch)
treefac4678359f80986bc9067747cee8da7ccf63943 /src/ui/documentwidget.c
parent161b6290df993a852bf9acc2c6a671426bd23131 (diff)
Full page scroll with PageUp and PageDown
Added separate keybindings for half page and full page scrolling. Space and Shift+Space do the half page scroll as before. Assigned new keybinding IDs to reset these to defaults in case they've been customized. IssueID #203
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 9111b546..79e8b727 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1918,8 +1918,9 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
1918 fetchNextUnfetchedImage_DocumentWidget_(d)) { 1918 fetchNextUnfetchedImage_DocumentWidget_(d)) {
1919 return iTrue; 1919 return iTrue;
1920 } 1920 }
1921 const float amount = argLabel_Command(cmd, "full") ? 1.0f : 0.5f;
1921 smoothScroll_DocumentWidget_(d, 1922 smoothScroll_DocumentWidget_(d,
1922 dir * (0.5f * height_Rect(documentBounds_DocumentWidget_(d)) - 1923 dir * (amount * height_Rect(documentBounds_DocumentWidget_(d)) -
1923 0 * lineHeight_Text(paragraph_FontId)), 1924 0 * lineHeight_Text(paragraph_FontId)),
1924 smoothDuration_DocumentWidget_); 1925 smoothDuration_DocumentWidget_);
1925 return iTrue; 1926 return iTrue;