diff options
-rw-r--r-- | res/about/version.gmi | 1 | ||||
-rw-r--r-- | src/prefs.c | 4 | ||||
-rw-r--r-- | src/prefs.h | 2 | ||||
-rw-r--r-- | src/ui/documentwidget.c | 8 | ||||
-rw-r--r-- | src/ui/listwidget.c | 2 |
5 files changed, 9 insertions, 8 deletions
diff --git a/res/about/version.gmi b/res/about/version.gmi index ba65b00d..d464f4f8 100644 --- a/res/about/version.gmi +++ b/res/about/version.gmi | |||
@@ -11,6 +11,7 @@ | |||
11 | * Added a footer action to view `application/octet-stream` content depending on recognized file extensions. | 11 | * Added a footer action to view `application/octet-stream` content depending on recognized file extensions. |
12 | 12 | ||
13 | ## 1.6.6 | 13 | ## 1.6.6 |
14 | * Adjusted mouse wheel smooth scrolling speed for better consistency. The default scrolling speeds were increased to level 2. | ||
14 | * Fixed URL encoding of the % character. | 15 | * Fixed URL encoding of the % character. |
15 | * Fixed hang when wrapping a very long word (with HarfBuzz disabled). | 16 | * Fixed hang when wrapping a very long word (with HarfBuzz disabled). |
16 | 17 | ||
diff --git a/src/prefs.c b/src/prefs.c index 749accf8..088cc7bc 100644 --- a/src/prefs.c +++ b/src/prefs.c | |||
@@ -42,8 +42,8 @@ void init_Prefs(iPrefs *d) { | |||
42 | d->returnKey = default_ReturnKeyBehavior; | 42 | d->returnKey = default_ReturnKeyBehavior; |
43 | d->hoverLink = iFalse; | 43 | d->hoverLink = iFalse; |
44 | d->smoothScrolling = iTrue; | 44 | d->smoothScrolling = iTrue; |
45 | d->smoothScrollSpeed[keyboard_ScrollType] = 10; | 45 | d->smoothScrollSpeed[keyboard_ScrollType] = 13; |
46 | d->smoothScrollSpeed[mouse_ScrollType] = 10; | 46 | d->smoothScrollSpeed[mouse_ScrollType] = 13; |
47 | d->loadImageInsteadOfScrolling = iFalse; | 47 | d->loadImageInsteadOfScrolling = iFalse; |
48 | d->collapsePreOnLoad = iFalse; | 48 | d->collapsePreOnLoad = iFalse; |
49 | d->openArchiveIndexPages = iTrue; | 49 | d->openArchiveIndexPages = iTrue; |
diff --git a/src/prefs.h b/src/prefs.h index 21960646..87c9a6e6 100644 --- a/src/prefs.h +++ b/src/prefs.h | |||
@@ -97,5 +97,5 @@ iDeclareTypeConstruction(Prefs) | |||
97 | 97 | ||
98 | iLocalDef float scrollSpeedFactor_Prefs(const iPrefs *d, enum iScrollType type) { | 98 | iLocalDef float scrollSpeedFactor_Prefs(const iPrefs *d, enum iScrollType type) { |
99 | iAssert(type >= 0 && type < max_ScrollType); | 99 | iAssert(type >= 0 && type < max_ScrollType); |
100 | return 10.0f / iMax(1, d->smoothScrollSpeed[type]); | 100 | return 10.0f / iMax(1, d->smoothScrollSpeed[type]) * (type == mouse_ScrollType ? 0.5f : 1.0f); |
101 | } | 101 | } |
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 6f9824de..5c1e473f 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -3489,11 +3489,11 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
3489 | smoothScroll_DocumentWidget_( | 3489 | smoothScroll_DocumentWidget_( |
3490 | d, | 3490 | d, |
3491 | -3 * amount * lineHeight_Text(paragraph_FontId), | 3491 | -3 * amount * lineHeight_Text(paragraph_FontId), |
3492 | smoothDuration_DocumentWidget_(mouse_ScrollType) * | 3492 | smoothDuration_DocumentWidget_(mouse_ScrollType)); |
3493 | /* accelerated speed for repeated wheelings */ | 3493 | /* accelerated speed for repeated wheelings */ |
3494 | (!isFinished_SmoothScroll(&d->scrollY) && pos_Anim(&d->scrollY.pos) < 0.25f | 3494 | // * (!isFinished_SmoothScroll(&d->scrollY) && pos_Anim(&d->scrollY.pos) < 0.25f |
3495 | ? 0.5f | 3495 | // ? 0.5f |
3496 | : 1.0f)); | 3496 | // : 1.0f)); |
3497 | scrollWideBlock_DocumentWidget_( | 3497 | scrollWideBlock_DocumentWidget_( |
3498 | d, mouseCoord, -3 * ev->wheel.x * lineHeight_Text(paragraph_FontId), 167); | 3498 | d, mouseCoord, -3 * ev->wheel.x * lineHeight_Text(paragraph_FontId), 167); |
3499 | } | 3499 | } |
diff --git a/src/ui/listwidget.c b/src/ui/listwidget.c index f896b493..ca15cc20 100644 --- a/src/ui/listwidget.c +++ b/src/ui/listwidget.c | |||
@@ -427,7 +427,7 @@ static iBool processEvent_ListWidget_(iListWidget *d, const SDL_Event *ev) { | |||
427 | /* Traditional mouse wheel. */ | 427 | /* Traditional mouse wheel. */ |
428 | amount *= 3 * d->itemHeight; | 428 | amount *= 3 * d->itemHeight; |
429 | moveSpan_SmoothScroll( | 429 | moveSpan_SmoothScroll( |
430 | &d->scrollY, amount, 200 * scrollSpeedFactor_Prefs(prefs_App(), mouse_ScrollType)); | 430 | &d->scrollY, amount, 600 * scrollSpeedFactor_Prefs(prefs_App(), mouse_ScrollType)); |
431 | } | 431 | } |
432 | return iTrue; | 432 | return iTrue; |
433 | } | 433 | } |