mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +00:00
Only smooth zoom now.
This commit is contained in:
parent
cd774b9e96
commit
45750a05a1
3
NEWS
3
NEWS
@ -44,8 +44,7 @@ v0.5 (xxxx-xx-xx)
|
|||||||
- User experience improvements in the graphical profiler.
|
- User experience improvements in the graphical profiler.
|
||||||
- Thread position and height is now animated, to eliminate flickering that
|
- Thread position and height is now animated, to eliminate flickering that
|
||||||
was happening when depth of displayed zones was changing.
|
was happening when depth of displayed zones was changing.
|
||||||
- Zooming in/out using the mouse wheel is now animated. Press the control
|
- Zooming in/out using the mouse wheel is now animated.
|
||||||
key for old behavior.
|
|
||||||
- Plot range adjustment is now animated.
|
- Plot range adjustment is now animated.
|
||||||
- System CPU usage is now being monitored.
|
- System CPU usage is now being monitored.
|
||||||
- Threads that have nothing to display in the current view are now hidden by
|
- Threads that have nothing to display in the current view are now hidden by
|
||||||
|
@ -1399,27 +1399,6 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d
|
|||||||
const double mouse = io.MousePos.x - wpos.x;
|
const double mouse = io.MousePos.x - wpos.x;
|
||||||
const auto p = mouse / w;
|
const auto p = mouse / w;
|
||||||
|
|
||||||
if( io.KeyCtrl )
|
|
||||||
{
|
|
||||||
m_zoomAnim.active = false;
|
|
||||||
m_pause = true;
|
|
||||||
const auto p1 = timespan * p;
|
|
||||||
const auto p2 = timespan - p1;
|
|
||||||
if( wheel > 0 )
|
|
||||||
{
|
|
||||||
m_zvStart += int64_t( p1 * 0.25 );
|
|
||||||
m_zvEnd -= int64_t( p2 * 0.25 );
|
|
||||||
}
|
|
||||||
else if( timespan < 1000ll * 1000 * 1000 * 60 * 60 )
|
|
||||||
{
|
|
||||||
m_zvStart -= std::max( int64_t( 1 ), int64_t( p1 * 0.25 ) );
|
|
||||||
m_zvEnd += std::max( int64_t( 1 ), int64_t( p2 * 0.25 ) );
|
|
||||||
}
|
|
||||||
timespan = m_zvEnd - m_zvStart;
|
|
||||||
pxns = w / double( timespan );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int64_t t0, t1;
|
int64_t t0, t1;
|
||||||
if( m_zoomAnim.active )
|
if( m_zoomAnim.active )
|
||||||
{
|
{
|
||||||
@ -1446,7 +1425,6 @@ void View::HandleZoneViewMouse( int64_t timespan, const ImVec2& wpos, float w, d
|
|||||||
}
|
}
|
||||||
ZoomToRange( t0, t1 );
|
ZoomToRange( t0, t1 );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* View::GetFrameText( const FrameData& fd, int i, uint64_t ftime, uint64_t offset ) const
|
const char* View::GetFrameText( const FrameData& fd, int i, uint64_t ftime, uint64_t offset ) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user