Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can't help but think a lot of code is needed here just to render some controls on a window.

Something like XAML for GTK would be nice.



It exists, it's GtkBuilder[1]. There's also a tool to create those XML files, Glade[2] (needs to be updated for Gtk4 but...)

1. https://developer.gnome.org/gtk4/stable/GtkBuilder.html

2. https://glade.gnome.org/


There is Glade. But some GNOME people seem to recommend against using Glade?

https://blogs.gnome.org/christopherdavis/2020/11/19/glade-no...

I have used GTK several times, but Qt always felt far more pleasant. Plus Qt applications work well on Windows and macOS, whereas GTK renders extremely slowly on macOS and looks and feels very non-native on Windows and macOS.


I think Qt is generally superior. Still, I find GTK easier to get my head around (though I don‘t work regularly with either). Also, as a vanilla Ubuntu user, GTK apps look better on my system.


From the link you provided, it seems Glade is not recommended because there exist better alternatives (in the view of the Gnome project, I can't comment on it).


The alternative is to use... some pen and a paper?

> . If you need to mock something up, you can try sketching on a piece of paper or using our mockup resources.

Linux GUI is honestly in a bizarre state. And the Gnome team seems to keeping on recommending against the tools they developed themselves (Vala...). Seems like QT is the best alternative...


This is why I like Qml so much, it is using an declarative ui language while having a nicely organized cpp code for the backend. But as far as I know GTK also have some xml files for the ui.


This is nothing compared to something like the Win32 API.

More importantly, this sort of code is incredibly simple and linear with virtually no logic or state, this is the worst sort of code to try and code golf into something more "elegant", you just end up with something more complicated but less flexible.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: