This is just an update. I kept working on my “tagged entry” widget. The tagged entry part was pretty easy to write (it is a composite widget), however it was very hard to build a generic “flow” widget with an own layout manager – the latter is a bit similar to a GtkFlowBox, but does not align things in columns, plus it has a GtkOrientation (implements a GtkOrientable), a GtkTextDirection and a GtkJustification.
As I mentioned, my “flow” widget is generic, non-composite, not related to my “tagged entry”, and can
potentially have plenty of other applications.
I still need to adjust a lot of things in both widgets. I hope the forum’s CSS gurus won’t eat me alive, this is just a draft (but any suggestion is welcomed).
As soon as I am able to put a bit of order in my code I will share it.
Okay, so I have sketched a first draft of my (tiny) GTK4 widget library. It was born as a repository for the widgets that I needed for my projects, but it might grow in the future. I believe that the interesting bits are the tagged entry widget and the highly-configurable flow container. The emblem picker widget might be a bit less interesting for most, but it is already in the wild with Nautilus Annotations.
Improvements are needed especially concerning the flow layout manager and the library’s CSS. In particular, I have not been able to solve a bug that affects the flow container when it is aligned as GTK_ALIGN_CENTER along its orientation axis, and this other bug (which might possibly be a GTK bug) – the two bugs might possibly be related. As for the CSS, it is really minimal at the moment, and so far I have never experimented with any kind of CSS preprocessor.
Under sandbox/before-install you can play with the widgets without having to install the library (in this case the library’s icons will not be loaded).
You can find the documentation either in the docs subdirectory or here.
Any feedback/help/critique/contribution will be very much appreciated!