mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Context menu hide for plots.
This commit is contained in:
parent
4bf6a2b9d2
commit
827bbeb442
@ -98,6 +98,7 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
|
||||
}
|
||||
if( v->data.empty() ) continue;
|
||||
bool& showFull = vis.showFull;
|
||||
ImGui::PushID( &vis );
|
||||
|
||||
float txtx = 0;
|
||||
const auto yPos = AdjustThreadPosition( vis, wpos.y, offset );
|
||||
@ -162,6 +163,10 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
|
||||
{
|
||||
ZoomToRange( first, last );
|
||||
}
|
||||
if( IsMouseClicked( 1 ) )
|
||||
{
|
||||
ImGui::OpenPopup( "menuPopup" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -409,9 +414,21 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
|
||||
offset += PlotHeight;
|
||||
}
|
||||
}
|
||||
|
||||
if( ImGui::BeginPopup( "menuPopup" ) )
|
||||
{
|
||||
if( ImGui::MenuItem( ICON_FA_EYE_SLASH " Hide" ) )
|
||||
{
|
||||
vis.visible = false;
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
offset += 0.2 * ty;
|
||||
AdjustThreadHeight( vis, oldOffset, offset );
|
||||
ImGui::PopClipRect();
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user