Skip to content

Having two seperators around a line has unequal vertical spacing #2657

Description

@Folling

Version: 1.71
Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw3.cpp
Compiler: clang
Operating System: arch-linux 64bit

My Issue/Question:
Having a Separator around a widget has one pixel more to the bottom than to the top. This might be unwanted behaviour as it creates an asymmetry.

Code to reproduce:

ImGui::Begin("Window");
ImGui::Separator();
ImGui::Button("Button");
ImGui::Separator();
ImGui::End();

Is rendered as:
image

I was able to resolve this by changing thickness_layout = 0.0f to thickness_layout = 1.0f in imgui_widgets' SeparatorEx, which is rendered as:
image

Sorry for posting this in another issue earlier!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions