I am currently writing some examples and explanations for Nim with GTK4.
Started with https://gitlab.gnome.org/GNOME/gtk/-/blob/master/tests/simple.c Comparing the C GTK3, the C GTK4 and the Nim version of it. Of course we know that this old GTK2 style is deprecated β the rest of the text will only use the new app style for all examples. But that example contains
gtk_widget_set_margin_top (button, 10);
gtk_widget_set_margin_bottom (button, 10);
gtk_widget_set_margin_start (button, 10);
gtk_widget_set_margin_end (button, 10);
Obviously the literal value 10 is very arbitrary. It should match in some way the user selected font size. In HTML and CSS often em and ex units are used instead of points. So is the literal 10 above a point, that is generally 1/72 inch, or a pixel. And does it depend on user display configuration? I think the Gnome desktop has some HiDPI settings which may modify the layout.