Pass ImGuiChildFlags instead of the legacy border bool to BeginChild().

This commit is contained in:
Bartosz Taudul
2026-10-14 22:20:59 +02:00
parent b683310a11
commit 84be3825d5
5 changed files with 8 additions and 8 deletions

View File

@@ -1232,7 +1232,7 @@ static void DrawContents()
{
tracy::OpenWebpage( "https://github.com/wolfpld/tracy/releases" );
}
ImGui::BeginChild( "###notes", ImVec2( 0, 0 ), true );
ImGui::BeginChild( "###notes", ImVec2( 0, 0 ), ImGuiChildFlags_Borders );
if( releaseNotes.empty() )
{
static float rnTime = 0;

View File

@@ -631,7 +631,7 @@ void SourceView::Render( Worker& worker, View& view, WindowConstraints& constrai
void SourceView::RenderSimpleSourceView()
{
ImGui::SetNextWindowContentSize( ImVec2( m_srcWidth, 0 ) );
ImGui::BeginChild( "##sourceView", ImVec2( 0, 0 ), true, ImGuiWindowFlags_HorizontalScrollbar );
ImGui::BeginChild( "##sourceView", ImVec2( 0, 0 ), ImGuiChildFlags_Borders, ImGuiWindowFlags_HorizontalScrollbar );
SetFont();
auto& lines = m_source.get();
@@ -1729,7 +1729,7 @@ void SourceView::RenderSymbolSourceView( const AddrStatData& as, Worker& worker,
const float bottom = m_srcSampleSelect.empty() ? 0 : ImGui::GetFrameHeight();
ImGui::SetNextWindowContentSize( ImVec2( m_srcWidth, 0 ) );
ImGui::BeginChild( "##sourceView", ImVec2( 0, -bottom ), true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_HorizontalScrollbar );
ImGui::BeginChild( "##sourceView", ImVec2( 0, -bottom ), ImGuiChildFlags_Borders, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_HorizontalScrollbar );
SetFont();
auto& lines = m_source.get();
@@ -2256,7 +2256,7 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
const float bottom = m_asmSampleSelect.empty() ? 0 : ImGui::GetFrameHeight();
ImGui::SetNextWindowContentSize( ImVec2( m_asmWidth, 0 ) );
ImGui::BeginChild( "##asmView", ImVec2( 0, -bottom ), true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_HorizontalScrollbar );
ImGui::BeginChild( "##asmView", ImVec2( 0, -bottom ), ImGuiChildFlags_Borders, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_HorizontalScrollbar );
SetFont();
int maxAddrLen;

View File

@@ -1137,7 +1137,7 @@ void View::DrawFlameGraph()
const auto rows = ( tsz + cols - 1 ) / cols;
const auto rowsVisible = std::min<float>( rows, 7.5f );
const auto rowsHeight = ImGui::GetTextLineHeightWithSpacing() * rowsVisible;
ImGui::BeginChild( "###flamegraphthreadrows", ImVec2( -1, rowsHeight ), false, ImGuiWindowFlags_AlwaysVerticalScrollbar );
ImGui::BeginChild( "###flamegraphthreadrows", ImVec2( -1, rowsHeight ), ImGuiChildFlags_None, ImGuiWindowFlags_AlwaysVerticalScrollbar );
int idx = 0;
ImGui::BeginTable( "##flamegraphthreadcols", cols, ImGuiTableFlags_NoSavedSettings );
@@ -1296,7 +1296,7 @@ void View::DrawFlameGraph()
ClampFlameGraphViewport( m_flameGraphViewStart, m_flameGraphViewEnd, zsz );
}
ImGui::BeginChild( "##flameGraphBody", ImVec2( 0, 0 ), false, ImGuiWindowFlags_NoScrollWithMouse );
ImGui::BeginChild( "##flameGraphBody", ImVec2( 0, 0 ), ImGuiChildFlags_None, ImGuiWindowFlags_NoScrollWithMouse );
const auto region = ImGui::GetContentRegionAvail();
const auto wpos = ImGui::GetCursorScreenPos();
const auto w = region.x;

View File

@@ -397,7 +397,7 @@ void View::DrawMemory()
auto pages = GetMemoryPages();
const size_t lines = pages.size();
ImGui::BeginChild( "##memMap", ImVec2( PageSize + 2, lines + 2 ), false );
ImGui::BeginChild( "##memMap", ImVec2( PageSize + 2, lines + 2 ), ImGuiChildFlags_None );
auto draw = ImGui::GetWindowDrawList();
const auto wpos = ImGui::GetCursorScreenPos() + ImVec2( 1, 1 );
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );

View File

@@ -350,7 +350,7 @@ void View::DrawTimeline()
draw->AddLineH( winpos.x, winpos.x + ImGui::GetContentRegionAvail().x + 1, yMin - 1, 0x0FFFFFFF );
ImGui::SetNextWindowContentSize( ImVec2( 0, m_tc.GetHeight() ) );
ImGui::BeginChild( "##zoneWin", ImVec2( ImGui::GetContentRegionAvail().x, ImGui::GetContentRegionAvail().y ), false, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoScrollWithMouse );
ImGui::BeginChild( "##zoneWin", ImVec2( ImGui::GetContentRegionAvail().x, ImGui::GetContentRegionAvail().y ), ImGuiChildFlags_None, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoScrollWithMouse );
if( m_yDelta != 0 )
{