TreeNode: fixed incorrect clipping of arrow/bullet when using ImGuiTreeNodeFlags_SpanAllColumns.
This commit is contained in:
@@ -69,6 +69,7 @@ Other changes:
|
|||||||
nodes in unusual ways, using indent to create tree-looking structures, etc.)
|
nodes in unusual ways, using indent to create tree-looking structures, etc.)
|
||||||
and the feature may not accurately represent them in every cases.
|
and the feature may not accurately represent them in every cases.
|
||||||
- The feature adds a little cost as extra data needs to be stored.
|
- The feature adds a little cost as extra data needs to be stored.
|
||||||
|
- TreeNode: fixed incorrect clipping of arrow/bullet when using ImGuiTreeNodeFlags_SpanAllColumns.
|
||||||
- Nav: fixed assertion when holding gamepad FaceLeft/West button to open
|
- Nav: fixed assertion when holding gamepad FaceLeft/West button to open
|
||||||
CTRL+Tab windowing + pressing a keyboard key. (#8525)
|
CTRL+Tab windowing + pressing a keyboard key. (#8525)
|
||||||
- Error Handling: added better error report and recovery for extraneous
|
- Error Handling: added better error report and recovery for extraneous
|
||||||
|
|||||||
+4
-3
@@ -6794,6 +6794,8 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
|
const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
|
||||||
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, true, style.FrameRounding);
|
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, true, style.FrameRounding);
|
||||||
RenderNavCursor(frame_bb, id, nav_render_cursor_flags);
|
RenderNavCursor(frame_bb, id, nav_render_cursor_flags);
|
||||||
|
if (span_all_columns && !span_all_columns_label)
|
||||||
|
TablePopBackgroundChannel();
|
||||||
if (flags & ImGuiTreeNodeFlags_Bullet)
|
if (flags & ImGuiTreeNodeFlags_Bullet)
|
||||||
RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.60f, text_pos.y + g.FontSize * 0.5f), text_col);
|
RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.60f, text_pos.y + g.FontSize * 0.5f), text_col);
|
||||||
else if (!is_leaf)
|
else if (!is_leaf)
|
||||||
@@ -6814,6 +6816,8 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, false);
|
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, false);
|
||||||
}
|
}
|
||||||
RenderNavCursor(frame_bb, id, nav_render_cursor_flags);
|
RenderNavCursor(frame_bb, id, nav_render_cursor_flags);
|
||||||
|
if (span_all_columns && !span_all_columns_label)
|
||||||
|
TablePopBackgroundChannel();
|
||||||
if (flags & ImGuiTreeNodeFlags_Bullet)
|
if (flags & ImGuiTreeNodeFlags_Bullet)
|
||||||
RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.5f, text_pos.y + g.FontSize * 0.5f), text_col);
|
RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.5f, text_pos.y + g.FontSize * 0.5f), text_col);
|
||||||
else if (!is_leaf)
|
else if (!is_leaf)
|
||||||
@@ -6825,9 +6829,6 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
if (draw_tree_lines)
|
if (draw_tree_lines)
|
||||||
TreeNodeDrawLineToChildNode(ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y + g.FontSize * 0.5f));
|
TreeNodeDrawLineToChildNode(ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y + g.FontSize * 0.5f));
|
||||||
|
|
||||||
if (span_all_columns && !span_all_columns_label)
|
|
||||||
TablePopBackgroundChannel();
|
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
if (display_frame)
|
if (display_frame)
|
||||||
RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size);
|
RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size);
|
||||||
|
|||||||
Reference in New Issue
Block a user