Mute color of unknown call frames.

This commit is contained in:
Bartosz Taudul 2020-02-22 21:17:10 +01:00
parent 096e8cd8ae
commit 6532f622cb

View File

@ -11107,8 +11107,19 @@ void View::DrawCallstackWindow()
TextDisabledUnformatted( "inline" ); TextDisabledUnformatted( "inline" );
} }
ImGui::NextColumn(); ImGui::NextColumn();
{
ImGui::TextWrapped( "%s", txt ); ImGuiWindow* window = ImGui::GetCurrentWindow();
ImGui::PushTextWrapPos( 0.0f );
if( txt[0] == '[' )
{
TextDisabledUnformatted( txt );
}
else
{
ImGui::TextUnformatted( txt );
}
ImGui::PopTextWrapPos();
}
if( ImGui::IsItemClicked() ) if( ImGui::IsItemClicked() )
{ {
ImGui::SetClipboardText( txt ); ImGui::SetClipboardText( txt );
@ -14327,10 +14338,17 @@ void View::CallstackTooltip( uint32_t idx )
TextDisabledUnformatted( "--" ); TextDisabledUnformatted( "--" );
} }
ImGui::SameLine(); ImGui::SameLine();
if( txt[0] == '[' )
{
TextDisabledUnformatted( txt );
}
else
{
ImGui::TextUnformatted( txt ); ImGui::TextUnformatted( txt );
} }
} }
} }
}
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
@ -14741,8 +14759,15 @@ void View::DrawCallstackCalls( uint32_t callstack, uint8_t limit ) const
} }
const auto& frame = frameData->data[frameData->size - 1]; const auto& frame = frameData->data[frameData->size - 1];
auto txt = m_worker.GetString( frame.name ); auto txt = m_worker.GetString( frame.name );
if( txt[0] == '[' )
{
TextDisabledUnformatted( txt );
}
else
{
ImGui::TextUnformatted( txt ); ImGui::TextUnformatted( txt );
} }
}
} }
void View::SetViewToLastFrames() void View::SetViewToLastFrames()