mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Update context switches look.
This commit is contained in:
parent
c17a913cf5
commit
6e8d57bc98
@ -6122,7 +6122,7 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
|
|||||||
const auto px0 = std::max( pr0, -10.0 );
|
const auto px0 = std::max( pr0, -10.0 );
|
||||||
const auto px1 = std::max( { std::min( pr1, double( w + 10 ) ), px0 + pxns * 0.5, px0 + MinVisSize } );
|
const auto px1 = std::max( { std::min( pr1, double( w + 10 ) ), px0 + pxns * 0.5, px0 + MinVisSize } );
|
||||||
|
|
||||||
uint32_t color, highlight;
|
uint32_t color;
|
||||||
if( m_vd.dynamicColors != 0 )
|
if( m_vd.dynamicColors != 0 )
|
||||||
{
|
{
|
||||||
color = local ? GetThreadColor( thread, 0 ) : ( untracked ? 0xFF663333 : 0xFF444444 );
|
color = local ? GetThreadColor( thread, 0 ) : ( untracked ? 0xFF663333 : 0xFF444444 );
|
||||||
@ -6131,18 +6131,20 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover,
|
|||||||
{
|
{
|
||||||
color = local ? 0xFF334488 : ( untracked ? 0xFF663333 : 0xFF444444 );
|
color = local ? 0xFF334488 : ( untracked ? 0xFF663333 : 0xFF444444 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), color );
|
||||||
if( m_drawThreadHighlight == thread )
|
if( m_drawThreadHighlight == thread )
|
||||||
{
|
{
|
||||||
highlight = 0xFFFFFFFF;
|
draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), 0xFFFFFFFF );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
highlight = HighlightColor( color );
|
const auto accentColor = HighlightColor( color );
|
||||||
|
const auto darkColor = DarkenColor( color );
|
||||||
|
DrawLine( draw, dpos + ImVec2( px0, offset + sty ), dpos + ImVec2( px0, offset ), dpos + ImVec2( px1-1, offset ), accentColor, 1.f );
|
||||||
|
DrawLine( draw, dpos + ImVec2( px0, offset + sty ), dpos + ImVec2( px1-1, offset + sty ), dpos + ImVec2( px1-1, offset ), darkColor, 1.f );
|
||||||
}
|
}
|
||||||
|
|
||||||
draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), color );
|
|
||||||
draw->AddRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + sty ), highlight );
|
|
||||||
|
|
||||||
auto tsz = ImGui::CalcTextSize( label );
|
auto tsz = ImGui::CalcTextSize( label );
|
||||||
if( tsz.x < zsz )
|
if( tsz.x < zsz )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user