fidgetty icon indicating copy to clipboard operation
fidgetty copied to clipboard

TextBox: overflow behaves weird

Open matkuki opened this issue 1 year ago • 2 comments

Fidget has the same problem on the OpenGL backend: demo_hb4i4M9i5G

matkuki avatar Dec 16 '22 21:12 matkuki

haha good find. It must be a bug from refactoring the widgets. Pretty sure previously the text box was under the outer border box which used clip: true to hide it.

I think that worked well, perhaps we could do a border box to both cover the text edge and to give borders their own space. It's annoying math, but I think using a CSS grid with the inner size set to the width of the border would be easier.

elcritch avatar Dec 20 '22 20:12 elcritch

Compare https://github.com/elcritch/fidgetty/blob/2d2a5adf138165c8f5c627afc41ec70cfddb3918/src/fidgetty/text.nim#L27 with https://github.com/elcritch/fidgetty/blob/2d2a5adf138165c8f5c627afc41ec70cfddb3918/src/fidgetty/textinput.nim#L65 -- it's missing the clip content.

It should be pretty easy to fixup. You can try it, or I'll get to it later this week.

elcritch avatar Dec 20 '22 20:12 elcritch