diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c8830e5d..3757fd3d 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4962,10 +4962,21 @@ void View::ListMemData( T ptr, T end, std::function DrawAdd } else { + bool hilite = m_callstackInfoWindow == v->csAlloc; + if( hilite ) + { + ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor::HSV( 0.f, 0.6f, 0.6f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) ); + } if( ImGui::SmallButton( "alloc" ) ) { m_callstackInfoWindow = v->csAlloc; } + if( hilite ) + { + ImGui::PopStyleColor( 3 ); + } if( ImGui::IsItemHovered() ) { CallstackTooltip( v->csAlloc ); @@ -4980,10 +4991,21 @@ void View::ListMemData( T ptr, T end, std::function DrawAdd } else { + bool hilite = m_callstackInfoWindow == v->csFree; + if( hilite ) + { + ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor::HSV( 0.f, 0.6f, 0.6f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV( 0.f, 0.7f, 0.7f ) ); + ImGui::PushStyleColor( ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV( 0.f, 0.8f, 0.8f ) ); + } if( ImGui::SmallButton( "free" ) ) { m_callstackInfoWindow = v->csFree; } + if( hilite ) + { + ImGui::PopStyleColor( 3 ); + } if( ImGui::IsItemHovered() ) { CallstackTooltip( v->csFree );