Better "load second trace" view in compare window.

This commit is contained in:
Bartosz Taudul 2024-09-28 01:53:37 +02:00
parent 293c76625c
commit 7cb82b9894
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -237,8 +237,14 @@ void View::DrawCompare()
#else #else
if( !m_compare.second ) if( !m_compare.second )
{ {
ImGui::TextWrapped( "Please load a second trace to compare results." ); const auto ty = ImGui::GetTextLineHeight();
if( ImGui::Button( ICON_FA_FOLDER_OPEN " Open second trace" ) && !m_compare.loadThread.joinable() ) ImGui::PushFont( m_bigFont );
ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 5 ) * 0.5f ) );
TextCentered( ICON_FA_SCALE_BALANCED );
TextCentered( "Please load a second trace to compare results" );
ImGui::PopFont();
ImGui::TextUnformatted( "" );
if( ButtonCentered( ICON_FA_FOLDER_OPEN " Open second trace" ) && !m_compare.loadThread.joinable() )
{ {
Fileselector::OpenFile( "tracy", "Tracy Profiler trace file", [this]( const char* fn ) { Fileselector::OpenFile( "tracy", "Tracy Profiler trace file", [this]( const char* fn ) {
try try