Skip to content

Commit

Permalink
CollapsingHeader: Minor fix to align right side of frames (which is e…
Browse files Browse the repository at this point in the history
…xtruded past the Work/Contents rect) with clipping rectangle.
  • Loading branch information
ocornut committed Jun 11, 2019
1 parent a8eb64f commit c3a348a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5143,7 +5143,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
{
// Framed header expand a little outside the default padding
frame_bb.Min.x -= (float)(int)(window->WindowPadding.x * 0.5f - 1.0f);
frame_bb.Max.x += (float)(int)(window->WindowPadding.x * 0.5f - 1.0f);
frame_bb.Max.x += (float)(int)(window->WindowPadding.x * 0.5f);
}

const float text_offset_x = (g.FontSize + (display_frame ? padding.x*3 : padding.x*2)); // Collapser arrow width + Spacing
Expand Down

0 comments on commit c3a348a

Please sign in to comment.