From 840709fe46e16e36428122a7a4433b3cad8536f5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 3 Sep 2022 22:55:54 +0200 Subject: [PATCH] Push pxns to HeaderExtraContents(). --- server/TracyTimelineItem.cpp | 2 +- server/TracyTimelineItem.hpp | 2 +- server/TracyTimelineItemPlot.cpp | 2 +- server/TracyTimelineItemPlot.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/TracyTimelineItem.cpp b/server/TracyTimelineItem.cpp index 2b9b2bd7..e964ad26 100644 --- a/server/TracyTimelineItem.cpp +++ b/server/TracyTimelineItem.cpp @@ -75,7 +75,7 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2 if( m_showFull ) { DrawLine( draw, dpos + ImVec2( 0, hdrOffset + ty - 1 ), dpos + ImVec2( w, hdrOffset + ty - 1 ), HeaderLineColor() ); - HeaderExtraContents( hdrOffset, wpos, labelWidth, hover ); + HeaderExtraContents( hdrOffset, wpos, labelWidth, pxns, hover ); } if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, hdrOffset ), wpos + ImVec2( ty + labelWidth, hdrOffset + ty ) ) ) diff --git a/server/TracyTimelineItem.hpp b/server/TracyTimelineItem.hpp index ae8381fa..4daa0c9b 100644 --- a/server/TracyTimelineItem.hpp +++ b/server/TracyTimelineItem.hpp @@ -32,7 +32,7 @@ protected: virtual const char* HeaderLabel() const = 0; virtual void HeaderTooltip( const char* label ) const {}; - virtual void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, bool hover ) {}; + virtual void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover ) {}; virtual int64_t RangeBegin() const = 0; virtual int64_t RangeEnd() const = 0; diff --git a/server/TracyTimelineItemPlot.cpp b/server/TracyTimelineItemPlot.cpp index 7dfce4eb..07e45ef1 100644 --- a/server/TracyTimelineItemPlot.cpp +++ b/server/TracyTimelineItemPlot.cpp @@ -81,7 +81,7 @@ void TimelineItemPlot::HeaderTooltip( const char* label ) const ImGui::EndTooltip(); } -void TimelineItemPlot::HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, bool hover ) +void TimelineItemPlot::HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover ) { auto draw = ImGui::GetWindowDrawList(); const auto ty = ImGui::GetTextLineHeight(); diff --git a/server/TracyTimelineItemPlot.hpp b/server/TracyTimelineItemPlot.hpp index 03374f92..d549777b 100644 --- a/server/TracyTimelineItemPlot.hpp +++ b/server/TracyTimelineItemPlot.hpp @@ -25,7 +25,7 @@ protected: int64_t RangeEnd() const override; void HeaderTooltip( const char* label ) const override; - void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, bool hover ) override; + void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover ) override; private: PlotData* m_plot;