Open mipmip opened 1 year ago
I gave it a try but it has to wait until the next gtk4.cr release:
Subclassing is done using annotations. The current gtk4.cr release doesn't include using ui files from gresource - only from path.
I'll point you at the examples from gtk4.cr:
With that said, here's a demo of an app that uses them: https://github.com/GeopJr/ultimate-gtk4-crystal-guide/tree/annotations-demo (!! it uses the master version of gtk4.cr that has gresource support on annotations)
While ui builder template => crystal is pretty straightforward, I couldn't figure out how to do the opposite at the moment :/ (using crystal custom widgets in ui builder files)
Back again with a new question that might be worthy for this awesome guide.
How to create a custom widget by subclassing an existing gtk widget and how to use this with the UI Builder or the BluePrint compiler.