From 621b6a8c49ce12479c1f8c027c77bdae77cff03a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Oct 2017 20:10:42 +0200 Subject: [PATCH] Don't clip text vertically. --- server/TracyView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 98a760a7..d23d64fa 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1368,7 +1368,7 @@ int View::DrawZoneLevel( const Vector& vec, bool hover, double pxns, con const auto x = ( ev.start - m_zvStart ) * pxns + ( ( end - ev.start ) * pxns - tsz.x ) / 2; if( x < 0 || x > w - tsz.x ) { - ImGui::PushClipRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), true ); + ImGui::PushClipRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y * 2 ), true ); draw->AddText( wpos + ImVec2( std::max( std::max( 0., px0 ), std::min( double( w - tsz.x ), x ) ), offset ), 0xFFFFFFFF, zoneName ); ImGui::PopClipRect(); } @@ -1379,7 +1379,7 @@ int View::DrawZoneLevel( const Vector& vec, bool hover, double pxns, con } else { - ImGui::PushClipRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), true ); + ImGui::PushClipRect( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y * 2 ), true ); draw->AddText( wpos + ImVec2( ( ev.start - m_zvStart ) * pxns, offset ), 0xFFFFFFFF, zoneName ); ImGui::PopClipRect(); }