Improve "no annotations" view.

This commit is contained in:
Bartosz Taudul 2024-10-15 02:04:45 +02:00
parent 1ab0b5abd2
commit 27d7939cc1
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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();