Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-09-03 19:53:05 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-09-03 19:53:05 +0300
commitfa207008257827ca56c3c2500f45fe97e2259a9a (patch)
tree5a5f70eba881b599085c56b8a6e909147920a093 /server
parent119152aac1459f0465568ab0d1e79f2ce49fb72d (diff)
Replace timeline item open/close triangles with font carets.
Diffstat (limited to 'server')
-rw-r--r--server/TracyTimelineItem.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/TracyTimelineItem.cpp b/server/TracyTimelineItem.cpp
index b7f6ea6a..e702e15d 100644
--- a/server/TracyTimelineItem.cpp
+++ b/server/TracyTimelineItem.cpp
@@ -42,19 +42,16 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
const bool drawHeader = yPos + ty >= yMin && yPos <= yMax;
if( drawHeader )
{
- const auto to = 9.f;
- const auto th = ( ty - to ) * sqrt( 3 ) * 0.5;
-
const auto color = HeaderColor();
const auto colorInactive = HeaderColorInactive();
if( m_showFull )
{
- draw->AddTriangleFilled( wpos + ImVec2( to/2, offset + to/2 ), wpos + ImVec2( ty - to/2, offset + to/2 ), wpos + ImVec2( ty * 0.5, offset + to/2 + th ), color );
+ DrawTextContrast( draw, wpos + ImVec2( 0, offset ), color, ICON_FA_CARET_DOWN );
}
else
{
- draw->AddTriangle( wpos + ImVec2( to/2, offset + to/2 ), wpos + ImVec2( to/2, offset + ty - to/2 ), wpos + ImVec2( to/2 + th, offset + ty * 0.5 ), colorInactive, 2.0f );
+ DrawTextContrast( draw, wpos + ImVec2( 0, offset ), colorInactive, ICON_FA_CARET_RIGHT );
}
const auto label = HeaderLabel();
labelWidth = ImGui::CalcTextSize( label ).x;