1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-07 23:43:52 +00:00

Draw range limit highlight.

This commit is contained in:
Bartosz Taudul 2019-12-28 17:23:09 +01:00
parent 46f3390365
commit 870c9c734f

View File

@ -2794,6 +2794,14 @@ void View::DrawZones()
draw->AddRect( ImVec2( wpos.x + px0, linepos.y ), ImVec2( wpos.x + px1, linepos.y + lineh ), 0x4488DD88 );
}
if( m_findZone.show && m_findZone.limitRange )
{
const auto px0 = ( m_findZone.rangeMin - m_vd.zvStart ) * pxns;
const auto px1 = std::max( px0 + std::max( 1.0, pxns * 0.5 ), ( m_findZone.rangeMax - m_vd.zvStart ) * pxns );
draw->AddRectFilled( ImVec2( wpos.x + px0, linepos.y ), ImVec2( wpos.x + px1, linepos.y + lineh ), 0x1188DDDD );
draw->AddRect( ImVec2( wpos.x + px0, linepos.y ), ImVec2( wpos.x + px1, linepos.y + lineh ), 0x2288DDDD );
}
if( m_highlight.active && m_highlight.start != m_highlight.end )
{
const auto s = std::min( m_highlight.start, m_highlight.end );