mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-31 15:38:33 +00:00
Replace vertical / horizontal AddLine calls with AddLineV / AddLineH.
This commit is contained in:
@@ -169,8 +169,8 @@ bool PrintTextWrapped( const char* text, const char* end, bool strikethrough, bo
|
||||
ImGui::SameLine( 0, 0 );
|
||||
auto x1 = ImGui::GetCursorScreenPos().x + scale;
|
||||
ImGui::NewLine();
|
||||
if( strikethrough ) ImGui::GetWindowDrawList()->AddLine( ImVec2( x0, y1 ), ImVec2( x1, y1 ), color, scale );
|
||||
if( underline ) ImGui::GetWindowDrawList()->AddLine( ImVec2( x0, y2 ), ImVec2( x1, y2 ), color, scale );
|
||||
if( strikethrough ) ImGui::GetWindowDrawList()->AddLineH( x0, x1, y1, color, scale );
|
||||
if( underline ) ImGui::GetWindowDrawList()->AddLineH( x0, x1, y2, color, scale );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -194,8 +194,8 @@ bool PrintTextWrapped( const char* text, const char* end, bool strikethrough, bo
|
||||
ImGui::SameLine( 0, 0 );
|
||||
auto x1 = ImGui::GetCursorScreenPos().x + scale;
|
||||
ImGui::NewLine();
|
||||
if( strikethrough ) ImGui::GetWindowDrawList()->AddLine( ImVec2( x0, y1 ), ImVec2( x1, y1 ), color, scale );
|
||||
if( underline ) ImGui::GetWindowDrawList()->AddLine( ImVec2( x0, y2 ), ImVec2( x1, y2 ), color, scale );
|
||||
if( strikethrough ) ImGui::GetWindowDrawList()->AddLineH( x0, x1, y1, color, scale );
|
||||
if( underline ) ImGui::GetWindowDrawList()->AddLineH( x0, x1, y2, color, scale );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -222,7 +222,7 @@ bool DragHeightSplitter( const char* id, float& height, float minHeight, float m
|
||||
const auto p0 = ImGui::GetItemRectMin();
|
||||
const auto p1 = ImGui::GetItemRectMax();
|
||||
const float y = ( p0.y + p1.y ) * 0.5f;
|
||||
draw->AddLine( ImVec2( p0.x, y ), ImVec2( p1.x, y ), color, thickness );
|
||||
draw->AddLineH( p0.x, p1.x, y, color, thickness );
|
||||
|
||||
return active;
|
||||
}
|
||||
|
||||
@@ -261,9 +261,8 @@ public:
|
||||
{
|
||||
const auto scale = GetScale();
|
||||
const auto pos = ImGui::GetCursorScreenPos();
|
||||
const auto offset = ImVec2( 8.f * scale, 0 );
|
||||
ImGui::Unindent();
|
||||
ImGui::GetWindowDrawList()->AddLine( origin - offset, pos - offset, color, 2.f * scale );
|
||||
ImGui::GetWindowDrawList()->AddLineV( origin.x - 8.f * scale, origin.y, pos.y, color, 2.f * scale );
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -827,7 +827,7 @@ void View::DrawOptions()
|
||||
if( ImGui::BeginDragDropTargetCustom( ImRect( wposx, m_threadDnd[i] - half, wposx + w, m_threadDnd[i] + half ), i+1 ) )
|
||||
{
|
||||
auto draw = ImGui::GetWindowDrawList();
|
||||
draw->AddLine( ImVec2( wposx, m_threadDnd[i] ), ImVec2( wposx + w, m_threadDnd[i] ), ImGui::GetColorU32(ImGuiCol_DragDropTarget), 2.f );
|
||||
draw->AddLineH( wposx, wposx + w, m_threadDnd[i], ImGui::GetColorU32(ImGuiCol_DragDropTarget), 2.f );
|
||||
if( auto payload = ImGui::AcceptDragDropPayload( "ThreadOrder", ImGuiDragDropFlags_AcceptNoDrawDefaultRect ) )
|
||||
{
|
||||
target = (int)i;
|
||||
|
||||
@@ -648,7 +648,7 @@ void View::DrawThreadCropper( const int depth, const uint64_t tid, const float x
|
||||
draw->AddCircle( center, hradius, 0xFFFFFFFF, 0, hoverCircleThickness );
|
||||
const float wPosX = ImGui::GetWindowPos().x + ImGui::GetWindowContentRegionMin().x;
|
||||
const float wSizeX = ImGui::GetWindowContentRegionMax().x;
|
||||
draw->AddLine( ImVec2( wPosX, yPos + ( lane + 1 ) * ostep ), ImVec2( wPosX + wSizeX, yPos + ( lane + 1 ) * ostep ), 0x880000FF, 2.0f * GetScale() );
|
||||
draw->AddLineH( wPosX, wPosX + wSizeX, yPos + ( lane + 1 ) * ostep, 0x880000FF, 2.0f * GetScale() );
|
||||
if( clicked )
|
||||
{
|
||||
const int newDepthLimit = lane + 1;
|
||||
|
||||
Reference in New Issue
Block a user