Skip to content

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

Closed

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!

Activity

  1. ocornut commented on Jul 8, 2019

    @ocornut
    Owner

    Reference
    c5d83d8
    9534ef9

  2. changed the title [-]Having two seperators around a line has unequal spacing[/-] [+]Having two seperators around a line has unequal vertical spacing[/+] on Feb 26, 2026
  3. ocornut commented on Feb 26, 2026

    @ocornut
    Owner

    This is fixed again by ef022c5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址