Use fractional max rows for visible threads display to imply scrolling.

This commit is contained in:
Bartosz Taudul
2026-05-02 01:41:28 +02:00
parent 6276f1b12a
commit 9965aff723
3 changed files with 3 additions and 3 deletions

View File

@@ -530,7 +530,7 @@ void View::DrawWaitStacks()
const int cols = std::max( 1, int( ImGui::GetContentRegionAvail().x / MinWidth ) );
const auto rows = ( tsz + cols - 1 ) / cols;
const auto rowsVisible = std::min<size_t>( rows, 8 );
const auto rowsVisible = std::min<float>( rows, 7.5f );
const auto rowsHeight = ImGui::GetTextLineHeightWithSpacing() * rowsVisible;
ImGui::BeginChild( "###waitstackthreadrows", ImVec2( -1, rowsHeight ) );

View File

@@ -849,7 +849,7 @@ void View::DrawFlameGraph()
const int cols = std::max( 1, int( ImGui::GetContentRegionAvail().x / MinWidth ) );
const auto rows = ( tsz + cols - 1 ) / cols;
const auto rowsVisible = std::min<size_t>( rows, 8 );
const auto rowsVisible = std::min<float>( rows, 7.5f );
const auto rowsHeight = ImGui::GetTextLineHeightWithSpacing() * rowsVisible;
ImGui::BeginChild( "###flamegraphthreadrows", ImVec2( -1, rowsHeight ) );

View File

@@ -212,7 +212,7 @@ void View::DrawMessages()
const int cols = std::max( 1, int( ImGui::GetContentRegionAvail().x / MinWidth ) );
const auto rows = ( tsz + cols - 1 ) / cols;
const auto rowsVisible = std::min<size_t>( rows, 8 );
const auto rowsVisible = std::min<float>( rows, 7.5f );
const auto rowsHeight = ImGui::GetTextLineHeightWithSpacing() * rowsVisible;
ImGui::BeginChild( "###msgthreadrows", ImVec2( -1, rowsHeight ) );