1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Prevent thick zone highlight from going outside the zone box.

This commit is contained in:
Bartosz Taudul
2022-09-09 00:18:40 +02:00
parent 5bd3f3de5f
commit 0e930a2c13
2 changed files with 16 additions and 2 deletions
+8 -1
View File
@@ -734,7 +734,14 @@ int View::DrawZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx, co
draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), zoneColor.color );
if( zoneColor.highlight )
{
draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), zoneColor.accentColor, 0.f, -1, zoneColor.thickness );
if( zoneColor.thickness > 1.f )
{
draw->AddRect( wpos + ImVec2( px0 + 1, offset + 1 ), wpos + ImVec2( px1 - 1, offset + tsz.y - 1 ), zoneColor.accentColor, 0.f, -1, zoneColor.thickness );
}
else
{
draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), zoneColor.accentColor, 0.f, -1, zoneColor.thickness );
}
}
else
{