Skip to content

Commit d734aaa

Browse files
committed
Improve "no data" screens in statistics window.
1 parent a34b058 commit d734aaa

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎profiler/src/profiler/TracyView_Statistics.cpp‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ void View::DrawStatistics()
4646
#else
4747
if( !m_worker.AreSourceLocationZonesReady() && ( !m_worker.AreCallstackSamplesReady() || m_worker.GetCallstackSampleCount() == 0 ) )
4848
{
49-
ImGui::TextWrapped( "Please wait, computing data..." );
49+
const auto ty = ImGui::GetTextLineHeight();
50+
ImGui::PushFont( m_bigFont );
51+
ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 2 - ty ) * 0.5f ) );
52+
TextCentered( ICON_FA_HIPPO );
53+
TextCentered( "Please wait, computing data..." );
54+
ImGui::PopFont();
5055
DrawWaitingDots( s_time );
5156
ImGui::End();
5257
return;
@@ -589,7 +594,11 @@ void View::DrawStatistics()
589594
{
590595
if( srcloc.empty() )
591596
{
592-
ImGui::TextUnformatted( "No entries to be displayed." );
597+
ImGui::PushFont( m_bigFont );
598+
ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 2 ) * 0.5f ) );
599+
TextCentered( ICON_FA_HIPPO );
600+
TextCentered( "No entries to be displayed" );
601+
ImGui::PopFont();
593602
}
594603
else
595604
{

0 commit comments

Comments
 (0)