owickstrom / gi-gtk-declarative

Declarative GTK+ programming in Haskell
https://owickstrom.github.io/gi-gtk-declarative/
288 stars 35 forks source link

Deprecate 'afterCreate' #13

Closed owickstrom closed 4 years ago

owickstrom commented 6 years ago

It was basically a hack, when custom widgets would be the right solution.

Maybe we should adopt CustomWidget from Komposition. It makes it much easier to build a custom widget, without having to do a lot of Typeable stuff:

https://github.com/owickstrom/komposition/blob/83bc84f353ca353f73f543e4496f6854fd864447/src/Komposition/UserInterface/GtkInterface/RangeSlider.hs#L29-L54

I think it could be made even easier by not requiring the internal custom state to be pattern matched on when using it in your custom widget.

owickstrom commented 5 years ago

Going to remove this entirely in next release.