Skip to content

Commit

Permalink
Try to make the top bar labels fit in their space.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfpld committed May 4, 2024
1 parent 4420f58 commit 6199b2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion profiler/src/profiler/TracyView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down Expand Up @@ -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" );
Expand Down

0 comments on commit 6199b2f

Please sign in to comment.