gtk_widget_get_allocated_width and gtk_widget_get_allocated_height are deprecated, let's use the recommended functions.
A lot of places were using gtk_widget_show/gtk_widget_hide, but those methods are deprecated since Gtk 4.10. Let's use gtk_widget_set_visible instead.