diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 8a91fd80..c96e5ec0 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4157,13 +4157,14 @@ void View::DrawZoneInfoWindow() pdqsort_branchless( cti.get(), cti.get() + children.size(), [&ctt] ( const auto& lhs, const auto& rhs ) { return ctt[lhs] > ctt[rhs]; } ); + const auto rztime = 1.0 / ztime; const auto ty = ImGui::GetTextLineHeight(); ImGui::Columns( 2 ); ImGui::TextColored( ImVec4( 1.0f, 1.0f, 0.4f, 1.0f ), "Self time" ); ImGui::NextColumn(); char buf[128]; sprintf( buf, "%s (%.2f%%)", TimeToString( ztime - ctime ), double( ztime - ctime ) / ztime * 100 ); - ImGui::ProgressBar( double( ztime - ctime ) / ztime, ImVec2( -1, ty ), buf ); + ImGui::ProgressBar( double( ztime - ctime ) * rztime, ImVec2( -1, ty ), buf ); ImGui::NextColumn(); for( size_t i=0; i