mirror of
https://github.com/chenasraf/webview_cef.git
synced 2026-05-17 17:48:07 +00:00
separate scroll behaviour between apple and other platform
This commit is contained in:
@@ -158,10 +158,13 @@ void WebviewHandler::sendScrollEvent(int x, int y, int deltaX, int deltaY) {
|
||||
#ifndef __APPLE__
|
||||
// The scrolling direction on Windows and Linux is different from MacOS
|
||||
deltaY = -deltaY;
|
||||
#endif
|
||||
|
||||
// Flutter scrolls too slowly, it looks more normal by 10x default speed.
|
||||
(*it)->GetHost()->SendMouseWheelEvent(ev, deltaX * 10, deltaY * 10);
|
||||
#else
|
||||
(*it)->GetHost()->SendMouseWheelEvent(ev, deltaX, deltaY);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user