Commit Graph

15 Commits (2cf7daca3036112c292ae1caec47cc307e17bd4c)

Author SHA1 Message Date
Tyler Goodlet 3375735914 Port kivy monitor to new tractor stream api 2021-04-29 09:10:11 -04:00
Tyler Goodlet e6ea053d40 Get kivy/questrade shit working again 2021-02-21 12:32:40 -05:00
Tyler Goodlet 8a46f8d6ed Port monitor to normalized streams 2020-10-02 12:13:28 -04:00
Tyler Goodlet 82a5daf91b Move all kivy ui components to subpackage 2020-10-02 12:13:28 -04:00
Tyler Goodlet bb81d7881c Use qt5 and trio guest mode 2020-10-02 12:13:27 -04:00
Tyler Goodlet dcb0a30ad6 Move UI spawning cmds to new module 2020-09-01 20:47:24 -04:00
Tyler Goodlet a2e5d07b2c Port to mainline kivy and Python 3.8
This required some copy-paste of code from @matham's branch:
https://github.com/kivy/kivy/pull/5241

namely, the stuff in the `utils_async.py` module. I've added all that as
a standalone file for now.

Update the pipfile to use `kivy`'s master branch (since there seems to
be some lingering cython issues in the current release wheels).
2019-11-21 10:21:43 -05:00
Tyler Goodlet 1f608b2498 Even less latent 2018-12-15 19:41:12 -05:00
Tyler Goodlet e3a3a8765c Remove destroyed widgets from mouse over list 2018-12-15 16:26:21 -05:00
Tyler Goodlet 9f3a316ccf Improve CPU usage using a clock trigger and deque
Copy out `kivy.clock.triggered` from version 1.10.1 since it isn't yet
available in the `trio`/async branch and use it to throttle the callback
rate. Use a `collections.deque` to LIFO iterate widgets each call
using the heuristic that it's more likely the mouse is still within the
currently highlighted (or it's adjacent neighbors) widget as opposed
to some far away widget (the case when the mouse is moved very
drastically across the window).
2018-12-09 13:39:38 -05:00
Tyler Goodlet eee19048f0 Support "mouse over" groups
Add a type factory func which returns mixin-able types for creating
mutex highlight-able groups of widgets.
2018-12-01 19:01:36 -05:00
Tyler Goodlet fd94a24d84 Rename to `mouse_over` 2018-12-01 18:43:44 -05:00
Tyler Goodlet 5c070b1c43 Faster highlighting via single loop and callback
Thanks yet again to @tshirtman for suggesting this.

Instead of defining a `on_mouse_pos()` on every widget simply
register and track each widget and loop through them all once (or as much
as is necessary) in a single callback. The assumption here is that we
get a performance boost by looping widgets instead of having `kivy` loop
and call back each widget thus avoiding costly python function calls.
2018-12-01 18:39:01 -05:00
Tyler Goodlet a8a5e836b9 Use static instruction for highlighted row
Instead of all this adding/removing of canvas instructions nonsense
simple add a static "highlighted" rectangle to each row and make its
size very small when there's no mouse over.

Mad props to @tshirtman for showing me the light :D
2018-11-24 16:17:06 -05:00
Tyler Goodlet 488bdb34be Add mouse-over row highlighting 2018-11-23 22:21:53 -05:00