mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Fix continuous frames tooltips.
At high zoom-out levels frame tooltip will be always displayed now for continuous frame sets. This greatly helps with scrubbing to an appropriate location, basing of frame images.
This commit is contained in:
parent
ffdd5290bf
commit
d0c2a26ced
@ -1867,6 +1867,7 @@ bool View::DrawZoneFrames( const FrameData& frames )
|
||||
const auto redColor = GetColorMuted( 0x4444FF, activeFrameSet );
|
||||
|
||||
int i = zrange.first;
|
||||
auto x1 = ( m_worker.GetFrameBegin( frames, i ) - m_vd.zvStart ) * pxns;
|
||||
while( i < zrange.second )
|
||||
{
|
||||
const auto ftime = m_worker.GetFrameTime( frames, i );
|
||||
@ -1874,7 +1875,11 @@ bool View::DrawZoneFrames( const FrameData& frames )
|
||||
const auto fend = m_worker.GetFrameEnd( frames, i );
|
||||
const auto fsz = pxns * ftime;
|
||||
|
||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( ( fbegin - m_vd.zvStart ) * pxns, 0 ), wpos + ImVec2( ( fend - m_vd.zvStart ) * pxns, ty ) ) )
|
||||
if( hover )
|
||||
{
|
||||
const auto x0 = frames.continuous ? x1 : ( fbegin - m_vd.zvStart ) * pxns;
|
||||
x1 = ( fend - m_vd.zvStart ) * pxns;
|
||||
if( ImGui::IsMouseHoveringRect( wpos + ImVec2( x0, 0 ), wpos + ImVec2( x1, ty ) ) )
|
||||
{
|
||||
tooltipDisplayed = true;
|
||||
|
||||
@ -1919,6 +1924,7 @@ bool View::DrawZoneFrames( const FrameData& frames )
|
||||
|
||||
if( activeFrameSet ) m_frameHover = i;
|
||||
}
|
||||
}
|
||||
|
||||
if( fsz < MinFrameSize )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user