diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-09 10:42:23 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-02-09 10:42:23 +0200 |
commit | 0585c687a38f0d177ec4db48567ea08326094111 (patch) | |
tree | ba1feafdda3a1258f7baa18edbe7eeaf97ff5bd8 /src/ui/widget.c | |
parent | 59363d3e230a0e9702e31936309473fb576ecec5 (diff) | |
parent | 4ae755de3ff4a37763aacc22ea119edab2099e84 (diff) |
Merge branch 'dev' into work/v1.11
# Conflicts:
# res/lang/eo.bin
# res/lang/ie.bin
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); |