christolliday / limn

Experimental cross platform GUI library
Other
404 stars 19 forks source link

Resizing initiates hover actions #49

Closed tones111 closed 6 years ago

tones111 commented 6 years ago

When resizing a window via dragging the edge mouse hover effects can be seen during the drag when a component moves over the position where the mouse was initially pressed. This is most easily seen in the button example where the button color changes while actively resizing.

This is likely related to the concerns of #38

christolliday commented 6 years ago

Thanks for the issue, turns out it happened because the component that updates hover state has to cache the mouse position and recheck what's there when the layout changes, but when you resize the window the mouse moves outside of the window and no positions are reported. Should be fixed by 26336502ae6c68f5af675e2e403170a88b1c81b1 The fix was to check for the CursorLeft event and set the mouse position that's used to check what is hovered to None.

tones111 commented 6 years ago

Thanks for the fix. You've been making impressive progress. Hopefully I'll get familiar enough to make code contributions once the churn settles down a little. Really enjoying watching it progress and looking forward to see what it becomes. Thanks for all your hard work.