mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGUI: Only redraw sliders after the on_change
callback has finished
This prevents the seek slider in VideoPlayer from skipping forward and then back when fast seeking is enabled. Previously, it was possible for a single frame to render before the actual seek position in the seek bar was set.
This commit is contained in:
parent
e391f18e9e
commit
d4c33a7134
Notes:
sideshowbarker
2024-07-17 02:23:25 +09:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/SerenityOS/serenity/commit/d4c33a7134 Pull-request: https://github.com/SerenityOS/serenity/pull/18300 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/trflynn89
1 changed files with 1 additions and 2 deletions
|
@ -57,10 +57,9 @@ void AbstractSlider::set_value(int value, AllowCallback allow_callback, DoClamp
|
|||
if (m_value == value)
|
||||
return;
|
||||
m_value = value;
|
||||
update();
|
||||
|
||||
if (on_change && allow_callback == AllowCallback::Yes)
|
||||
on_change(m_value);
|
||||
update();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue