From 5955efabb0674cf31f2cb4f3179436ab3d7f798f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 30 May 2020 15:24:27 +0200 Subject: [PATCH] Use combo box for smart/entry/sample location selection. --- server/TracyView.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 358b476d..f214e9ac 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11540,11 +11540,9 @@ void View::DrawStatistics() ImGui::SameLine(); ImGui::TextUnformatted( "Location:" ); ImGui::SameLine(); - ImGui::RadioButton( "Smart", &m_statSampleLocation, 2 ); - ImGui::SameLine(); - ImGui::RadioButton( "Entry", &m_statSampleLocation, 0 ); - ImGui::SameLine(); - ImGui::RadioButton( "Sample", &m_statSampleLocation, 1 ); + const char* locationTable = "Entry\0Sample\0Smart"; + ImGui::SetNextItemWidth( ImGui::CalcTextSize( "Sample" ).x + ImGui::GetTextLineHeight() * 2 ); + ImGui::Combo( "##location", &m_statSampleLocation, locationTable ); ImGui::Separator(); const auto& symMap = m_worker.GetSymbolMap();