[gtk: 1/2] docs: Mention GtkImage and GtkPicture changes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] docs: Mention GtkImage and GtkPicture changes
- Date: Fri, 17 Dec 2021 00:32:09 +0000 (UTC)
commit 484c0fdd15704edd3a12e2faea3dae3f7f6cab5a
Author: Jakub KulĂk <kulikjak gmail com>
Date: Fri Dec 17 00:32:08 2021 +0000
docs: Mention GtkImage and GtkPicture changes
docs/reference/gtk/migrating-3to4.md | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/docs/reference/gtk/migrating-3to4.md b/docs/reference/gtk/migrating-3to4.md
index 068b97212a..c45098d777 100644
--- a/docs/reference/gtk/migrating-3to4.md
+++ b/docs/reference/gtk/migrating-3to4.md
@@ -1276,6 +1276,15 @@ is provided in the form of a `GtkIconPaintable` (this can be checked with
[method@Gtk.IconPaintable.is_symbolic]), you have to call
[method@Gtk.IconPaintable.get_icon_name] and set the icon name on a `GtkImage`.
+### Adapt to GtkImage changes
+`GtkPicture`'s behaviour was "split out" of `GtkImage` as the latter was covering
+too many use cases; if you're loading an icon, [class@Gtk.Image] in GTK3 and GTK4 are
+perfectly equivalent. If you are loading a more complex image asset, like a picture
+or a thumbnail, then [class@Gtk.Picture] is the appropriate widget.
+
+One noteworthy distinction is that while `GtkImage` has its size computed by
+GTK, `GtkPicture` lets you decide about the size.
+
### Update to GtkFileChooser API changes
`GtkFileChooser` moved to a GFile-based API. If you need to convert a path
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]