From 27d7939cc17f554627aae717bb1e31c4405230ef Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 15 Oct 2024 02:04:45 +0200 Subject: [PATCH] Improve "no annotations" view. --- profiler/src/profiler/TracyView_Annotations.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/profiler/src/profiler/TracyView_Annotations.cpp b/profiler/src/profiler/TracyView_Annotations.cpp index 67e8b291..b8a0a612 100644 --- a/profiler/src/profiler/TracyView_Annotations.cpp +++ b/profiler/src/profiler/TracyView_Annotations.cpp @@ -80,17 +80,23 @@ void View::DrawAnnotationList() AddAnnotation( m_vd.zvStart, m_vd.zvEnd ); } - ImGui::SameLine(); - ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical ); - ImGui::SameLine(); - if( m_annotations.empty() ) { - ImGui::TextWrapped( "No annotations." ); ImGui::Separator(); + ImGui::PushFont( m_bigFont ); + ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 2 ) * 0.5f ) ); + TextCentered( ICON_FA_HORSE ); + TextCentered( "No annotations" ); + ImGui::PopFont(); ImGui::End(); return; } + else + { + ImGui::SameLine(); + ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical ); + ImGui::SameLine(); + } TextFocused( "Annotations:", RealToString( m_annotations.size() ) ); ImGui::Separator();