From d71a38632ccaf8cc20cd0be1b992dd2db91f09f6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Feb 2026 13:02:40 +0100 Subject: [PATCH] Nice formatting for host info. --- profiler/src/profiler/TracyView_TraceInfo.cpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyView_TraceInfo.cpp b/profiler/src/profiler/TracyView_TraceInfo.cpp index a5cab9c6..d43f4b14 100644 --- a/profiler/src/profiler/TracyView_TraceInfo.cpp +++ b/profiler/src/profiler/TracyView_TraceInfo.cpp @@ -891,7 +891,28 @@ void View::DrawInfo() ImGui::Separator(); TextFocused( "PID:", RealToString( m_worker.GetPid() ) ); - TextFocused( "Host info:", m_worker.GetHostInfo().c_str() ); + TextDisabledUnformatted( "Host info:" ); + ImGui::Indent(); + const auto hostInfo = m_worker.GetHostInfo(); + const auto hostLines = SplitLines( hostInfo.c_str(), hostInfo.size() ); + ImGui::PushStyleVar( ImGuiStyleVar_ItemSpacing, ImVec2( ImGui::GetStyle().ItemSpacing.x, 0.0f ) ); + for( auto& line : hostLines ) + { + auto pos = line.find( ':' ); + if( pos != std::string::npos ) + { + pos++; + TextFocused( line.substr( 0, pos ).c_str(), line.substr( pos+1 ).c_str() ); + } + else + { + ImGui::TextUnformatted( line.c_str() ); + } + } + ImGui::PopStyleVar(); + ImGui::Unindent(); + ImGui::SameLine(); + ImGui::NewLine(); const auto cpuId = m_worker.GetCpuId(); if( cpuId != 0 )