Immediate-Mode-UI / Immediate-Mode-UI/Nuklear

Negative X causes a scrollbar to appear, even though it shouldn't

Open
#211 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
11.4k
Forks
686
Avg merge
4d 1h
Merged PRs (30d)
3

Description

Nuklear's (0,0) is in the center of the image. When the window is moved horizontally into negative space, this happens: (ignore my half-baked rendering, I'm still working on the outlines)

![image](https://user-images.githubusercontent.com/4723091/96780221-7a73bd80-13a1-11eb-9975-91e7e8649beb.png)

But it only happens when the the scrollable area is in the horizontal negative space:
![image](https://user-images.githubusercontent.com/4723091/96782200-0f76b680-13a2-11eb-9fcc-cf2dbc0e1f29.png)

In the next image, moving the Nuklear window just 1 pixel to the left causes the horizontal scrollbar to appear. I added a dark overlay over one half of the image:
![image](https://user-images.githubusercontent.com/4723091/96781680-f0782480-13a1-11eb-8239-ff42d0ecf863.png)

This does not happen vertically, only horizontally. The vertical position of the window has no effect, whether it is in positive or negative space.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by moving the Nuklear window one pixel into negative horizontal space and compare the horizontal and vertical behavior shown in the attached images. No source file or test is named; done means horizontal negative positioning no longer causes an unnecessary scrollbar while legitimate scrolling still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.