Astal icon indicating copy to clipboard operation
Astal copied to clipboard

Add new Gizmo widget helper to create custom widgets in GTK4

Open ARKye03 opened this issue 10 months ago • 3 comments

While gtkgizmo.c is quite simple, I need to review the code thoroughly and test it in the field (e.g. CircularProgress).

[!NOTE] CircularProgress above will be merged onto https://github.com/ARKye03/astal/tree/feat/CircularProgressWidget, to keep work at #282

ARKye03 avatar Feb 20 '25 17:02 ARKye03

I used it to construct the CircularProgress keeping it more readable and simple, and it works. So, it's ready for review. This widget is no more than a ""copy-paste"" of the gtkgizmo, but in Vala.

ARKye03 avatar Feb 20 '25 19:02 ARKye03

Should AstalGizmo implement Gtk.Buildable?

No. Creating a Gizmo with a Builder is nonesense, as you can't define the functions that way.

Also using function pointers like here in gobject introspection is not that straight forward. It would involve a bit more work. I think the best cause of action would be making that class internal instead of public, so it can be used by astal, but it's not exposed in the gir.

Otherwise looks good to me, didn't test it though.

kotontrion avatar Feb 20 '25 19:02 kotontrion

Should AstalGizmo implement Gtk.Buildable?

No. Creating a Gizmo with a Builder is nonesense, as you can't define the functions that way.

Yes, I realized this rather quickly.

Also using function pointers like here in gobject introspection is not that straight forward. It would involve a bit more work. I think the best cause of action would be making that class internal instead of public, so it can be used by astal, but it's not exposed in the gir.

I made it internal

Now I can rest and ignore GJS bindings <3

ARKye03 avatar Feb 20 '25 20:02 ARKye03

following on https://github.com/Aylur/astal/pull/282#issuecomment-3065702333

Hello, from what I see this pr seems to be ready to be merged.

Is there is any blocker ?

JulesdeCube avatar Jul 12 '25 18:07 JulesdeCube