Skip to content

Commit

Permalink
Disable wrapping of message lines in zone info window.
Browse files Browse the repository at this point in the history
This unifies the behavior with message list in messages window.
  • Loading branch information
wolfpld committed Oct 4, 2024
1 parent 471ed0e commit 384646b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion profiler/src/profiler/TracyView_ZoneInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,19 @@ void View::DrawZoneInfoWindow()
ImGui::PopID();
ImGui::TableNextColumn();
ImGui::PushStyleColor( ImGuiCol_Text, (*msgit)->color );
ImGui::TextWrapped( "%s", m_worker.GetString( (*msgit)->ref ) );
const auto text = m_worker.GetString( (*msgit)->ref );
auto tend = text;
while( *tend != '\0' && *tend != '\n' ) tend++;
const auto cw = ImGui::GetContentRegionAvail().x;
const auto tw = ImGui::CalcTextSize( text, tend ).x;
ImGui::TextUnformatted( text, tend );
if( tw > cw && ImGui::IsItemHovered() )
{
ImGui::SetNextWindowSize( ImVec2( 1000 * GetScale(), 0 ) );
ImGui::BeginTooltip();
ImGui::TextWrapped( "%s", text );
ImGui::EndTooltip();
}
ImGui::PopStyleColor();
}
while( ++msgit != msgend );
Expand Down

0 comments on commit 384646b

Please sign in to comment.