Add touchpad support for frames overview.

This commit is contained in:
Bartosz Taudul 2022-04-13 01:37:56 +02:00
parent 29b9d8ffe5
commit 5eb724f34c
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1832,11 +1832,13 @@ void View::DrawFrames()
if( hover )
{
if( IsMouseDragging( 1 ) )
const auto hwheel_delta = io.MouseWheelH * 100.f;
if( IsMouseDragging( 1 ) || hwheel_delta != 0 )
{
m_viewMode = ViewMode::Paused;
m_viewModeHeuristicTry = false;
const auto delta = GetMouseDragDelta( 1 ).x;
auto delta = GetMouseDragDelta( 1 ).x;
if( delta == 0 ) delta = hwheel_delta;
if( abs( delta ) >= fwidth )
{
const auto d = (int)delta / fwidth;