mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-22 17:11:35 +00:00
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.
This commit is contained in:
@@ -8286,7 +8286,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
|||||||
style.TreeLinesFlags = option;
|
style.TreeLinesFlags = option;
|
||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
ImGui::SliderFloat("TreeLinesSize", &style.TreeLinesSize, 0.0f, 1.0f, "%.0f");
|
ImGui::SliderFloat("TreeLinesSize", &style.TreeLinesSize, 0.0f, 2.0f, "%.0f");
|
||||||
ImGui::Combo("ColorButtonPosition", (int*)&style.ColorButtonPosition, "Left\0Right\0");
|
ImGui::Combo("ColorButtonPosition", (int*)&style.ColorButtonPosition, "Left\0Right\0");
|
||||||
ImGui::SliderFloat2("ButtonTextAlign", (float*)&style.ButtonTextAlign, 0.0f, 1.0f, "%.2f");
|
ImGui::SliderFloat2("ButtonTextAlign", (float*)&style.ButtonTextAlign, 0.0f, 1.0f, "%.2f");
|
||||||
ImGui::SameLine(); HelpMarker("Alignment applies when a button is larger than its text content.");
|
ImGui::SameLine(); HelpMarker("Alignment applies when a button is larger than its text content.");
|
||||||
|
|||||||
@@ -6641,7 +6641,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
|
|||||||
bool store_tree_node_stack_data = false;
|
bool store_tree_node_stack_data = false;
|
||||||
if ((flags & ImGuiTreeNodeFlags_DrawLinesMask_) == 0)
|
if ((flags & ImGuiTreeNodeFlags_DrawLinesMask_) == 0)
|
||||||
flags |= g.Style.TreeLinesFlags;
|
flags |= g.Style.TreeLinesFlags;
|
||||||
const bool draw_tree_lines = (flags & (ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes)) && (frame_bb.Min.y < window->ClipRect.Max.y);// && (g.Style.TreeLinesSize > 0.0f);
|
const bool draw_tree_lines = (flags & (ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes)) && (frame_bb.Min.y < window->ClipRect.Max.y) && (g.Style.TreeLinesSize > 0.0f);
|
||||||
if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
|
||||||
{
|
{
|
||||||
if ((flags & ImGuiTreeNodeFlags_NavLeftJumpsBackHere) && !g.NavIdIsAlive)
|
if ((flags & ImGuiTreeNodeFlags_NavLeftJumpsBackHere) && !g.NavIdIsAlive)
|
||||||
|
|||||||
Reference in New Issue
Block a user