Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Fix Edit Widget's border area around text

Open ryuukk opened this issue 1 year ago • 5 comments

Before/After:

image

ryuukk avatar Sep 24 '24 12:09 ryuukk

Looks like this was from https://github.com/Immediate-Mode-UI/Nuklear/pull/592 . Anywhere else we need to update here? Thanks for investigating.

RobLoach avatar Sep 24 '24 22:09 RobLoach

I had a test on this, and it seems to work for me. Anything else we should consider before merging?

As for which value is for which, I'd love for us to move to a similar to the css...

Screenshot from 2024-09-30 13-01-50

RobLoach avatar Sep 30 '24 17:09 RobLoach

While this looks okay to me, I think it would be good if we got some others to take a look. Thanks!

RobLoach avatar Dec 07 '24 18:12 RobLoach

Not sure what is expected in fact, as @ryuukk observed: border is inner, outer, or half the way? I haven't dig in the code parts to check.

I pretty agree on a clear definition of bound parts like in CSS, but even there all depends on the box-sizing property, and that's not an easy choice.

In one hand, a border-box style would be easier to figure out a layout because borders wouldn't interfere with the outer view of content size, but on another hand with content-box equivalent, available content area is minus the border size, which is harder to determine which room is given.

Choosing in between would make it worse (in my opinion) and nondeterministic because one should always compute content area bound rect on half the border size.

Maybe we need to think deeper about it and make tries and guesses.

riri avatar Dec 08 '24 21:12 riri