Skip to content

FramePadding Is Not Re-Aligned For Clipping When Altered #3731

@atom0s

Description

@atom0s

Version/Branch of Dear ImGui: 0ea4408 (Latest as of this post.)

Version: 1.80WIP
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_win32.cpp + imgui_impl_dx9.cpp (and my own for Direct3D8)
Compiler: Visual Studio 2019 16.8.4
Operating System: Windows 10

My Issue/Question:

When altering the global FramePadding value, the clip handling inside of ImGui does not account for the changes.
This causes things like text to run past their expected clipping sections.

This is reproducible in the main branch code, as-is just by altering the FramePadding size.

  1. Clone the latest master.
  2. Compile the examples.
  3. Run the Direct3D9 example.
  4. Open the Styles editor. (Tools -> Style Editor)
  5. Change FramePadding to 3x2.

Next, in the Dear ImGui Demo window, go to Window Options and check No Close.

Now you can slowly resize the window until the title text clips past the window frame. This is easier to see with a magnifier. (Windows has one built-in if needed.)

Screenshots/Video

https://i.imgur.com/mRz1xuJ.png

Standalone, minimal, complete and verifiable example: (see #2261)

See steps above to use the current examples to test this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions