iced-rs / iced_aw

Additional widgets for the Iced GUI library
MIT License
467 stars 110 forks source link

Number_input fixes #233

Closed the-marenga closed 7 months ago

the-marenga commented 7 months ago

Sorry in advance for turning a one line fix into this, but I just kept finding unrelated bugs, while I was checking if the initial fix had any bugs and just kept fixing them.

These fixes include:

I was losing track of where which event part was handled, so I repackaged all of it into mainly one match and only pass keyboard events to the textinput, that are correctly checked

To make the testing for myself easier, I also added the ability to use ctra+a,v,c & accept '-' as a key input

There is still some minor jank around negative numbers and bounds that do not contain 0, but I am pretty sure these things could only be solved by not passing the event to the child/text for inserts/deletes, which would require reimplementing a bunch of selection & cursor movement logic

Closes #232