diff options
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index 9f67b1c7..fc754b7a 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -1290,7 +1290,7 @@ iBool processEvent_Widget(iWidget *d, const SDL_Event *ev) { | |||
1290 | /* TODO: Motion events occur frequently. Maybe it would help if these were handled | 1290 | /* TODO: Motion events occur frequently. Maybe it would help if these were handled |
1291 | via audiences that specifically register to listen for motion, to minimize the | 1291 | via audiences that specifically register to listen for motion, to minimize the |
1292 | number of widgets that need to process them. */ | 1292 | number of widgets that need to process them. */ |
1293 | const int hoverScrollLimit = 1.5f * lineHeight_Text(default_FontId); | 1293 | const int hoverScrollLimit = 3.0f * lineHeight_Text(default_FontId); |
1294 | float speed = 0.0f; | 1294 | float speed = 0.0f; |
1295 | if (ev->motion.y < hoverScrollLimit) { | 1295 | if (ev->motion.y < hoverScrollLimit) { |
1296 | speed = (hoverScrollLimit - ev->motion.y) / (float) hoverScrollLimit; | 1296 | speed = (hoverScrollLimit - ev->motion.y) / (float) hoverScrollLimit; |
@@ -1315,7 +1315,7 @@ iBool processEvent_Widget(iWidget *d, const SDL_Event *ev) { | |||
1315 | if (elapsed > 100) { | 1315 | if (elapsed > 100) { |
1316 | elapsed = 16; | 1316 | elapsed = 16; |
1317 | } | 1317 | } |
1318 | int step = elapsed * gap_UI / 16 * iClamp(speed, -1.0f, 1.0f); | 1318 | int step = elapsed * gap_UI / 8 * iClamp(speed, -1.0f, 1.0f); |
1319 | if (step != 0) { | 1319 | if (step != 0) { |
1320 | lastHoverOverflowMotionTime_ = nowTime; | 1320 | lastHoverOverflowMotionTime_ = nowTime; |
1321 | scrollOverflow_Widget(d, step); | 1321 | scrollOverflow_Widget(d, step); |