mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Highlight zones selected in the find zone menu.
This commit is contained in:
parent
4ca4c85976
commit
05c9325018
@ -7832,9 +7832,16 @@ const char* View::GetPlotName( const PlotData* plot ) const
|
|||||||
|
|
||||||
uint32_t View::GetZoneColor( const ZoneEvent& ev )
|
uint32_t View::GetZoneColor( const ZoneEvent& ev )
|
||||||
{
|
{
|
||||||
const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
|
if( m_findZone.show && !m_findZone.match.empty() && m_findZone.match[m_findZone.selMatch] == ev.srcloc )
|
||||||
const auto color = srcloc.color;
|
{
|
||||||
return color != 0 ? ( color | 0xFF000000 ) : 0xFFCC5555;
|
return 0xFF229999;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
|
||||||
|
const auto color = srcloc.color;
|
||||||
|
return color != 0 ? ( color | 0xFF000000 ) : 0xFFCC5555;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t View::GetZoneColor( const GpuEvent& ev )
|
uint32_t View::GetZoneColor( const GpuEvent& ev )
|
||||||
@ -7894,7 +7901,7 @@ uint32_t View::GetZoneHighlight( const GpuEvent& ev )
|
|||||||
|
|
||||||
float View::GetZoneThickness( const ZoneEvent& ev )
|
float View::GetZoneThickness( const ZoneEvent& ev )
|
||||||
{
|
{
|
||||||
if( m_zoneInfoWindow == &ev || m_zoneHighlight == &ev )
|
if( m_zoneInfoWindow == &ev || m_zoneHighlight == &ev || ( m_findZone.show && !m_findZone.match.empty() && m_findZone.match[m_findZone.selMatch] == ev.srcloc ) )
|
||||||
{
|
{
|
||||||
return 3.f;
|
return 3.f;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user