Fix drawing folded ghost zones.

This commit is contained in:
Bartosz Taudul 2023-03-22 20:52:44 +01:00
parent a3947fbc57
commit d085f2541a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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 rend = v.rend.Val();
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 );
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 ) ) )