mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fix collapsed zones height.
This commit is contained in:
parent
4227d34599
commit
65e89e6e80
@ -1243,7 +1243,8 @@ int View::DrawZoneLevel( const Vector<Event*>& vec, bool hover, double pxns, con
|
|||||||
if( it != vec.end() )
|
if( it != vec.end() )
|
||||||
{
|
{
|
||||||
const auto w = ImGui::GetWindowContentRegionWidth();
|
const auto w = ImGui::GetWindowContentRegionWidth();
|
||||||
const auto ostep = ImGui::GetFontSize() + 1;
|
const auto ty = ImGui::GetFontSize();
|
||||||
|
const auto ostep = ty + 1;
|
||||||
const auto offset = _offset + ostep * depth;
|
const auto offset = _offset + ostep * depth;
|
||||||
auto draw = ImGui::GetWindowDrawList();
|
auto draw = ImGui::GetWindowDrawList();
|
||||||
const auto dsz = m_delay * pxns;
|
const auto dsz = m_delay * pxns;
|
||||||
@ -1276,8 +1277,8 @@ int View::DrawZoneLevel( const Vector<Event*>& vec, bool hover, double pxns, con
|
|||||||
rend = nend;
|
rend = nend;
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
draw->AddRectFilled( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( px1, double( w + 10 ) ), offset + ostep ), color, 2.f );
|
draw->AddRectFilled( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( px1, double( w + 10 ) ), offset + ty ), color, 2.f );
|
||||||
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( px1, double( w + 10 ) ), offset + ostep ) ) )
|
if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( std::max( px0, -10.0 ), offset ), wpos + ImVec2( std::min( px1, double( w + 10 ) ), offset + ty ) ) )
|
||||||
{
|
{
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::Text( "Zones too small to display: %i", num );
|
ImGui::Text( "Zones too small to display: %i", num );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user