mlem
mlem copied to clipboard
[2.0] Generalized widget view
There's a lot of redundant code in our widget buttons--most of them can be centralized into a WidgetView. Off the top of my head, such a view would need:
- emtpy/full icon
- background color
- callback
With the additional complexity that some toggleable widgets' icons change depending on toggle state, which could be handled either by adding some optional parameters or defining a ToggleableWidgetView that wraps WidgetView and pipes down the appropriate icon