From 929d399995554d5a3750091f6b8b81264eef111f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 8 Jun 2020 14:02:11 +0200 Subject: [PATCH] Fix determination of line width. --- server/TracySourceView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index f8decbe0..74c96397 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -2091,7 +2091,7 @@ void SourceView::RenderLine( const Line& line, int lineNum, uint32_t ipcnt, uint { const auto ty = ImGui::GetFontSize(); auto draw = ImGui::GetWindowDrawList(); - const auto w = m_srcWidth; + const auto w = std::max( m_srcWidth, ImGui::GetWindowWidth() ); const auto wpos = ImGui::GetCursorScreenPos(); if( m_fileStringIdx == m_hoveredSource && lineNum == m_hoveredLine ) { @@ -2268,7 +2268,7 @@ void SourceView::RenderAsmLine( AsmLine& line, uint32_t ipcnt, uint32_t iptotal, { const auto ty = ImGui::GetFontSize(); auto draw = ImGui::GetWindowDrawList(); - const auto w = m_asmWidth; + const auto w = std::max( m_asmWidth, ImGui::GetWindowWidth() ); const auto wpos = ImGui::GetCursorScreenPos(); if( m_selectedAddressesHover.find( line.addr ) != m_selectedAddressesHover.end() ) {