Make collpsed zones gray in source location dynamic color mode.

The reasoning is that you want to use the color to see where a zone of
a particular type is placed. When collapsed zones go back to displaying
thread color, you may mistake such region of collapsed zones for something
they aren't.
This commit is contained in:
Bartosz Taudul 2023-03-04 22:54:58 +01:00
parent 2434514a42
commit 107afd78a4
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -271,7 +271,7 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
if( zsz < MinVisSize ) if( zsz < MinVisSize )
{ {
const auto MinVisNs = MinVisSize * nspx; const auto MinVisNs = MinVisSize * nspx;
const auto color = MixGhostColor( GetThreadColor( tid, depth ), 0x665555 ); const auto color = m_vd.dynamicColors == 2 ? 0xFF666666 : MixGhostColor( GetThreadColor( tid, depth ), 0x665555 );
const auto px0 = ( ev.start.Val() - m_vd.zvStart ) * pxns; const auto px0 = ( ev.start.Val() - m_vd.zvStart ) * pxns;
auto px1ns = ev.end.Val() - m_vd.zvStart; auto px1ns = ev.end.Val() - m_vd.zvStart;
auto rend = end; auto rend = end;
@ -640,7 +640,7 @@ int View::DrawZoneLevel( const V& vec, bool hover, double pxns, int64_t nspx, co
if( zsz < MinVisSize ) if( zsz < MinVisSize )
{ {
const auto MinVisNs = MinVisSize * nspx; const auto MinVisNs = MinVisSize * nspx;
const auto color = GetThreadColor( tid, depth ); const auto color = m_vd.dynamicColors == 2 ? 0xFF666666 : GetThreadColor( tid, depth );
int num = 0; int num = 0;
const auto px0 = ( ev.Start() - m_vd.zvStart ) * pxns; const auto px0 = ( ev.Start() - m_vd.zvStart ) * pxns;
auto px1ns = end - m_vd.zvStart; auto px1ns = end - m_vd.zvStart;