Skip to content

Commit 5e7174d

Browse files
committed
TreeNode: removed TreeLinesSize > 0.0f optimization check. (#2920)
This is desirable but we'd need to avoid exposing 0.0f in style editor + assert on it.
1 parent 74e453c commit 5e7174d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

imgui_demo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8286,7 +8286,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
82868286
style.TreeLinesFlags = option;
82878287
ImGui::EndCombo();
82888288
}
8289-
ImGui::SliderFloat("TreeLinesSize", &style.TreeLinesSize, 0.0f, 1.0f, "%.0f");
8289+
ImGui::SliderFloat("TreeLinesSize", &style.TreeLinesSize, 0.0f, 2.0f, "%.0f");
82908290
ImGui::Combo("ColorButtonPosition", (int*)&style.ColorButtonPosition, "Left\0Right\0");
82918291
ImGui::SliderFloat2("ButtonTextAlign", (float*)&style.ButtonTextAlign, 0.0f, 1.0f, "%.2f");
82928292
ImGui::SameLine(); HelpMarker("Alignment applies when a button is larger than its text content.");

imgui_widgets.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6641,7 +6641,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
66416641
bool store_tree_node_stack_data = false;
66426642
if ((flags & ImGuiTreeNodeFlags_DrawLinesMask_) == 0)
66436643
flags |= g.Style.TreeLinesFlags;
6644-
const bool draw_tree_lines = (flags & (ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes)) && (frame_bb.Min.y < window->ClipRect.Max.y);// && (g.Style.TreeLinesSize > 0.0f);
6644+
const bool draw_tree_lines = (flags & (ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes)) && (frame_bb.Min.y < window->ClipRect.Max.y) && (g.Style.TreeLinesSize > 0.0f);
66456645
if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
66466646
{
66476647
if ((flags & ImGuiTreeNodeFlags_NavLeftJumpsBackHere) && !g.NavIdIsAlive)

0 commit comments

Comments
 (0)