From 6199b2f883e614484f305422cf91c17f50d5a9fe Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 4 May 2024 14:07:14 +0200 Subject: [PATCH] Try to make the top bar labels fit in their space. --- profiler/src/profiler/TracyView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index c7c3f50a..fdbbfd84 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -976,8 +976,8 @@ bool View::DrawImpl() ImGui::SameLine(); ImGui::Spacing(); ImGui::SameLine(); - const auto targetLabelSize = ImGui::CalcTextSize( "WWWWWWW" ).x; + auto targetLabelSize = ImGui::CalcTextSize( ICON_FA_EYE " 12345.67 ms" ).x; auto cx = ImGui::GetCursorPosX(); ImGui::Text( ICON_FA_EYE " %s", TimeToString( m_vd.zvEnd - m_vd.zvStart ) ); TooltipIfHovered( "View span" ); @@ -1010,6 +1010,7 @@ bool View::DrawImpl() dx = ImGui::GetCursorPosX() - cx; if( dx < targetLabelSize ) ImGui::SameLine( cx + targetLabelSize ); + targetLabelSize = ImGui::CalcTextSize( ICON_FA_MEMORY " 1234.56 MB (123.45 %%)" ).x; cx = ImGui::GetCursorPosX(); ImGui::Text( ICON_FA_MEMORY " %s", MemSizeToString( memUsage ) ); TooltipIfHovered( "Profiler memory usage" );