summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-06 16:04:59 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-06 16:04:59 +0200
commit6ffe005a8ad62fb5ecdd5fc6d63f914b9c45142c (patch)
tree69f4b088a2326807d92e7bdd63c78135f894785a /src/ui/util.c
parenta4a7a75cd70d41e45f12afbaba0b0bb3faa5dfd3 (diff)
Added an option to disable smooth scrolling
IssueID #27
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index ceab01b8..e65e089d 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -188,7 +188,7 @@ static float valueAt_Anim_(const iAnim *d, const uint32_t now) {
188void setValue_Anim(iAnim *d, float to, uint32_t span) { 188void setValue_Anim(iAnim *d, float to, uint32_t span) {
189 if (span == 0) { 189 if (span == 0) {
190 d->from = d->to = to; 190 d->from = d->to = to;
191 d->when = d->due = SDL_GetTicks(); 191 d->when = d->due = frameTime_Window(get_Window()); /* effectively in the past */
192 } 192 }
193 else if (fabsf(to - d->to) > 0.00001f) { 193 else if (fabsf(to - d->to) > 0.00001f) {
194 const uint32_t now = SDL_GetTicks(); 194 const uint32_t now = SDL_GetTicks();
@@ -997,6 +997,8 @@ iWidget *makePreferences_Widget(void) {
997 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.downloads"); 997 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.downloads");
998 addChild_Widget(headings, iClob(makeHeading_Widget("Outline on scrollbar:"))); 998 addChild_Widget(headings, iClob(makeHeading_Widget("Outline on scrollbar:")));
999 addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoveroutline"))); 999 addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoveroutline")));
1000 addChild_Widget(headings, iClob(makeHeading_Widget("Smooth scrolling:")));
1001 addChild_Widget(values, iClob(makeToggle_Widget("prefs.smoothscroll")));
1000 makeTwoColumnHeading_("WINDOW", headings, values); 1002 makeTwoColumnHeading_("WINDOW", headings, values);
1001#if defined (iPlatformApple) || defined (iPlatformMSys) 1003#if defined (iPlatformApple) || defined (iPlatformMSys)
1002 addChild_Widget(headings, iClob(makeHeading_Widget("Use system theme:"))); 1004 addChild_Widget(headings, iClob(makeHeading_Widget("Use system theme:")));