mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-16 05:45:26 +00:00
Show tooltips for multiline messages
This commit is contained in:
@@ -365,7 +365,7 @@ void View::DrawMessageLine( const MessageData& msg, bool hasCallstack, int& idx
|
||||
const auto cw = ImGui::GetContentRegionAvail().x;
|
||||
const auto tw = ImGui::CalcTextSize( text, tend ).x;
|
||||
ImGui::TextUnformatted( text, tend );
|
||||
if( tw > cw && ImGui::IsItemHovered() )
|
||||
if( (tw > cw || *tend != '\0') && ImGui::IsItemHovered() )
|
||||
{
|
||||
ImGui::SetNextWindowSize( ImVec2( 1000 * GetScale(), 0 ) );
|
||||
ImGui::BeginTooltip();
|
||||
|
||||
@@ -863,7 +863,7 @@ void View::DrawZoneInfoWindow()
|
||||
const auto cw = ImGui::GetContentRegionAvail().x;
|
||||
const auto tw = ImGui::CalcTextSize( text, tend ).x;
|
||||
ImGui::TextUnformatted( text, tend );
|
||||
if( tw > cw && ImGui::IsItemHovered() )
|
||||
if( (tw > cw || *tend != '\0') && ImGui::IsItemHovered() )
|
||||
{
|
||||
ImGui::SetNextWindowSize( ImVec2( 1000 * GetScale(), 0 ) );
|
||||
ImGui::BeginTooltip();
|
||||
|
||||
Reference in New Issue
Block a user