mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Disable wrapping of message lines in zone info window.
This unifies the behavior with message list in messages window.
This commit is contained in:
parent
471ed0ef65
commit
384646b03b
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user