mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Fix drawing folded ghost zones.
This commit is contained in:
parent
a3947fbc57
commit
d085f2541a
@ -446,7 +446,7 @@ void View::DrawZoneList( const TimelineContext& ctx, const std::vector<TimelineD
|
|||||||
const auto color = m_vd.dynamicColors == 2 ? 0xFF666666 : MixGhostColor( GetThreadColor( tid, v.depth ), 0x665555 );
|
const auto color = m_vd.dynamicColors == 2 ? 0xFF666666 : MixGhostColor( GetThreadColor( tid, v.depth ), 0x665555 );
|
||||||
const auto rend = v.rend.Val();
|
const auto rend = v.rend.Val();
|
||||||
const auto px0 = ( ev.start.Val() - m_vd.zvStart ) * pxns;
|
const auto px0 = ( ev.start.Val() - m_vd.zvStart ) * pxns;
|
||||||
const auto px1 = ( rend - ev.end.Val() ) * pxns;
|
const auto px1 = ( rend - m_vd.zvStart ) * pxns;
|
||||||
draw->AddRectFilled( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), offset + ty ), color );
|
draw->AddRectFilled( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), offset + ty ), color );
|
||||||
DrawZigZag( draw, wpos + ImVec2( 0, offset + ty/2 ), std::max( px0, -10.0 ), std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), ty/4, DarkenColor( color ) );
|
DrawZigZag( draw, wpos + ImVec2( 0, offset + ty/2 ), std::max( px0, -10.0 ), std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), ty/4, DarkenColor( color ) );
|
||||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), offset + ty + 1 ) ) )
|
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( std::max( px1, px0+MinVisSize ), double( w + 10 ) ), offset + ty + 1 ) ) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user