From c4cf690e397a993a0f3be9acde418362c9f0c72b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 4 Aug 2020 17:28:42 +0200 Subject: [PATCH] Display annotation extent on annotations list. --- server/TracyView.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index f03d6f31..751782bc 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -14315,7 +14315,7 @@ void View::DrawSelectedAnnotation() void View::DrawAnnotationList() { - ImGui::SetNextWindowSize( ImVec2( 500, 300 ), ImGuiCond_FirstUseEver ); + ImGui::SetNextWindowSize( ImVec2( 600, 300 ), ImGuiCond_FirstUseEver ); ImGui::Begin( "Annotation list", &m_showAnnotationList ); if( m_annotations.empty() ) { @@ -14364,6 +14364,10 @@ void View::DrawAnnotationList() { ImGui::TextUnformatted( ann->text.c_str() ); } + ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); + ImGui::TextDisabled( "%s - %s (%s)", TimeToStringExact( ann->range.min ), TimeToStringExact( ann->range.max ), TimeToString( ann->range.max - ann->range.min ) ); ImGui::PopID(); idx++; } @@ -14718,6 +14722,8 @@ void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, cons range.max = v->range.max; } ImGui::SameLine(); + ImGui::Spacing(); + ImGui::SameLine(); ImGui::TextDisabled( "%s - %s (%s)", TimeToStringExact( v->range.min ), TimeToStringExact( v->range.max ), TimeToString( v->range.max - v->range.min ) ); } ImGui::EndPopup();