|
@@ -6396,10 +6396,9 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiID storage_id, ImGuiTreeNodeFlags
|
|
frame_bb.Max.y = window->DC.CursorPos.y + frame_height;
|
|
frame_bb.Max.y = window->DC.CursorPos.y + frame_height;
|
|
if (display_frame)
|
|
if (display_frame)
|
|
{
|
|
{
|
|
- // Framed header expand a little outside the default padding, to the edge of InnerClipRect
|
|
|
|
- // (FIXME: May remove this at some point and make InnerClipRect align with WindowPadding.x instead of WindowPadding.x*0.5f)
|
|
|
|
- frame_bb.Min.x -= IM_TRUNC(window->WindowPadding.x * 0.5f - 1.0f);
|
|
|
|
- frame_bb.Max.x += IM_TRUNC(window->WindowPadding.x * 0.5f);
|
|
|
|
|
|
+ const float outer_extend = IM_TRUNC(window->WindowPadding.x * 0.5f); // Framed header expand a little outside of current limits
|
|
|
|
+ frame_bb.Min.x -= outer_extend;
|
|
|
|
+ frame_bb.Max.x += outer_extend;
|
|
}
|
|
}
|
|
|
|
|
|
ImVec2 text_pos(window->DC.CursorPos.x + text_offset_x, window->DC.CursorPos.y + text_offset_y);
|
|
ImVec2 text_pos(window->DC.CursorPos.x + text_offset_x, window->DC.CursorPos.y + text_offset_y);
|
|
@@ -6783,7 +6782,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
|
const ImVec2 text_max(min_x + size.x, pos.y + size.y);
|
|
const ImVec2 text_max(min_x + size.x, pos.y + size.y);
|
|
|
|
|
|
// Selectables are meant to be tightly packed together with no click-gap, so we extend their box to cover spacing between selectable.
|
|
// Selectables are meant to be tightly packed together with no click-gap, so we extend their box to cover spacing between selectable.
|
|
- // FIXME: Not part of layout so not included in clipper calculation, but ItemSize currenty doesn't allow offsetting CursorPos.
|
|
|
|
|
|
+ // FIXME: Not part of layout so not included in clipper calculation, but ItemSize currently doesn't allow offsetting CursorPos.
|
|
ImRect bb(min_x, pos.y, text_max.x, text_max.y);
|
|
ImRect bb(min_x, pos.y, text_max.x, text_max.y);
|
|
if ((flags & ImGuiSelectableFlags_NoPadWithHalfSpacing) == 0)
|
|
if ((flags & ImGuiSelectableFlags_NoPadWithHalfSpacing) == 0)
|
|
{
|
|
{
|