mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Make zone highlight more visible.
This commit is contained in:
parent
077585ba4d
commit
d7bd8885fe
@ -1191,7 +1191,7 @@ int View::DrawZoneLevel( const Vector<Event*>& vec, bool hover, double pxns, con
|
|||||||
const auto px0 = std::max( pr0, -10.0 );
|
const auto px0 = std::max( pr0, -10.0 );
|
||||||
const auto px1 = std::min( pr1, double( w + 10 ) );
|
const auto px1 = std::min( pr1, double( w + 10 ) );
|
||||||
draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), color, 2.f );
|
draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), color, 2.f );
|
||||||
draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), GetZoneHighlight( ev ), 2.f );
|
draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), GetZoneHighlight( ev ), 2.f, -1, GetZoneThickness( ev ) );
|
||||||
if( dsz * dmul >= MinVisSize )
|
if( dsz * dmul >= MinVisSize )
|
||||||
{
|
{
|
||||||
draw->AddRectFilled( wpos + ImVec2( pr0, offset ), wpos + ImVec2( std::min( pr0+dsz*dmul, pr1 ), offset + tsz.y ), 0x882222DD, 2.f );
|
draw->AddRectFilled( wpos + ImVec2( pr0, offset ), wpos + ImVec2( std::min( pr0+dsz*dmul, pr1 ), offset + tsz.y ), 0x882222DD, 2.f );
|
||||||
@ -1382,6 +1382,18 @@ uint32_t View::GetZoneHighlight( const Event& ev )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float View::GetZoneThickness( const Event& ev )
|
||||||
|
{
|
||||||
|
if( m_zoneInfoWindow == &ev || m_zoneHighlight == &ev )
|
||||||
|
{
|
||||||
|
return 3.f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 1.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void View::ZoomToZone( const Event& ev )
|
void View::ZoomToZone( const Event& ev )
|
||||||
{
|
{
|
||||||
if( ev.end - ev.start <= 0 ) return;
|
if( ev.end - ev.start <= 0 ) return;
|
||||||
|
@ -88,6 +88,7 @@ private:
|
|||||||
void DrawZoneInfoWindow();
|
void DrawZoneInfoWindow();
|
||||||
|
|
||||||
uint32_t GetZoneHighlight( const Event& ev );
|
uint32_t GetZoneHighlight( const Event& ev );
|
||||||
|
float GetZoneThickness( const Event& ev );
|
||||||
void ZoomToZone( const Event& ev );
|
void ZoomToZone( const Event& ev );
|
||||||
void ZoneTooltip( const Event& ev );
|
void ZoneTooltip( const Event& ev );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user