From 2866cafda5c9bfd8f4b381c6f5a04641e28406c0 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 29 Jun 2018 00:44:05 +0200 Subject: [PATCH] Adapt histogram height to font size. --- server/TracyView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 92bf37dc..9889cd0e 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3838,7 +3838,7 @@ void View::DrawFindZone() ImGui::Text( "Zone group time: none" ); } - enum { Height = 200 }; + const auto Height = 200 * ImGui::GetTextLineHeight() / 15.f; const auto wpos = ImGui::GetCursorScreenPos(); ImGui::InvisibleButton( "##histogram", ImVec2( w, Height + round( ty * 1.5 ) ) ); @@ -4604,7 +4604,7 @@ void View::DrawCompare() ImGui::SameLine(); ImGui::Text( "Overlap" ); - enum { Height = 200 }; + const auto Height = 200 * ImGui::GetTextLineHeight() / 15.f; const auto wpos = ImGui::GetCursorScreenPos(); ImGui::InvisibleButton( "##histogram", ImVec2( w, Height + round( ty * 1.5 ) ) );