mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 08:33:48 +00:00
Use fractional max rows for visible threads display to imply scrolling.
This commit is contained in:
@@ -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 ) );
|
||||
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user