mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
CollapsingHeader/TreeNode: Fixed text padding when using _Framed+_Leaf flags. (#6549)
This commit is contained in:
parent
6b2e03c5b1
commit
0a53b45858
@ -67,7 +67,9 @@ Other changes:
|
|||||||
- IsWindowHovered, IsItemHovered: Assert when passed any unsupported flags.
|
- IsWindowHovered, IsItemHovered: Assert when passed any unsupported flags.
|
||||||
- Tables: Fixed a regression in 1.89.6 leading to the first column of tables with either
|
- Tables: Fixed a regression in 1.89.6 leading to the first column of tables with either
|
||||||
ScrollX or ScrollY flags from being impossible to resize. (#6503)
|
ScrollX or ScrollY flags from being impossible to resize. (#6503)
|
||||||
- InputText: Fixed not returning true when buffer is cleared by ImGuiInputTextFlags_EscapeClearsAll. (#5688, #2620)
|
- CollapsingHeader/TreeNode: Fixed text padding when using _Framed+_Leaf flags. (#6549) [@BobbyAnguelov]
|
||||||
|
- InputText: Fixed not returning true when buffer is cleared while using the
|
||||||
|
ImGuiInputTextFlags_EscapeClearsAll flag. (#5688, #2620)
|
||||||
- Clipper: Rework inner logic to allow functioning with a zero-clear constructor.
|
- Clipper: Rework inner logic to allow functioning with a zero-clear constructor.
|
||||||
This is order to facilitate usage for language bindings (e.g cimgui or dear_binding)
|
This is order to facilitate usage for language bindings (e.g cimgui or dear_binding)
|
||||||
where user may not be callinga constructor manually. (#5856)
|
where user may not be callinga constructor manually. (#5856)
|
||||||
|
@ -6262,7 +6262,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
else if (!is_leaf)
|
else if (!is_leaf)
|
||||||
RenderArrow(window->DrawList, ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y), text_col, is_open ? ((flags & ImGuiTreeNodeFlags_UpsideDownArrow) ? ImGuiDir_Up : ImGuiDir_Down) : ImGuiDir_Right, 1.0f);
|
RenderArrow(window->DrawList, ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y), text_col, is_open ? ((flags & ImGuiTreeNodeFlags_UpsideDownArrow) ? ImGuiDir_Up : ImGuiDir_Down) : ImGuiDir_Right, 1.0f);
|
||||||
else // Leaf without bullet, left-adjusted text
|
else // Leaf without bullet, left-adjusted text
|
||||||
text_pos.x -= text_offset_x;
|
text_pos.x -= text_offset_x -padding.x;
|
||||||
if (flags & ImGuiTreeNodeFlags_ClipLabelForTrailingButton)
|
if (flags & ImGuiTreeNodeFlags_ClipLabelForTrailingButton)
|
||||||
frame_bb.Max.x -= g.FontSize + style.FramePadding.x;
|
frame_bb.Max.x -= g.FontSize + style.FramePadding.x;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user