docs: Migration guide updates
authorMatthias Clasen <mclasen@redhat.com>
Sat, 29 Apr 2023 20:15:02 +0000 (16:15 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 30 Apr 2023 22:21:46 +0000 (18:21 -0400)
Mention various widget size apis going away.

docs/reference/gtk/migrating-4to5.md

index b147fc61ca0afbef2ce458dc3aaaab33b003db04..30e9e2d6e04a579e055d447afb5e05b50fe0f0de 100644 (file)
@@ -119,3 +119,17 @@ it no longer has a resize handle for the window.
 
 These are very specialized widgets that should better live with the application
 where they are used.
+
+## Widget size api changes
+
+The functions gtk_widget_get_allocated_width() and gtk_widget_get_allocated_height()
+are going away. In most cases, [method@Gtk.Widget.get_width] and [method@Gtk.Widget.get_height]
+are suitable replacements. Note that the semantics are slightly different though:
+the old functions return the size of the CSS border area, while the new functions return
+the size of the widgets content area. In places where this difference matters, you can
+use `gtk_widget_compute_bounds (widget, widget, &bounds)` instead.
+
+The function gtk_widget_get_allocation() is also going away. It does not have a direct
+replacement, but the previously mentioned alternatives can be used for it too.
+
+The function gtk_widget_get_allocated_baseline() has been renamed to [method@Gtk.Widget.get_baseline].