diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-04-30 22:39:57 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-04-30 22:39:57 +0000 |
commit | b310ab730416ab15e52f08f0f5d20f7152faf6e3 (patch) | |
tree | e98eda9f5e5975f0bd359d93efdd77cb6ef097c0 | |
parent | 062e3da57dbc49f5608b5ad3ffd4c2c60eabf2b7 (diff) | |
parent | cdbd931dbab22b4110f5cbe819d6c1be555de7ef (diff) | |
download | gtk+-b310ab730416ab15e52f08f0f5d20f7152faf6e3.tar.gz |
Merge branch 'matthiasc/for-main' into 'main'
docs: Migration guide updates
See merge request GNOME/gtk!5899
-rw-r--r-- | docs/reference/gtk/migrating-4to5.md | 14 | ||||
-rw-r--r-- | gsk/gl/gskglrenderjob.c | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/reference/gtk/migrating-4to5.md b/docs/reference/gtk/migrating-4to5.md index b147fc61ca..30e9e2d6e0 100644 --- a/docs/reference/gtk/migrating-4to5.md +++ b/docs/reference/gtk/migrating-4to5.md @@ -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]. diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c index 051619528c..d3bdef751d 100644 --- a/gsk/gl/gskglrenderjob.c +++ b/gsk/gl/gskglrenderjob.c @@ -4145,6 +4145,7 @@ gsk_gl_render_job_visit_node_with_offscreen (GskGLRenderJob *job, flipped_x ? -1 : 1, flipped_y ? -1 : 1); gsk_gl_render_job_push_modelview (job, transform); + gsk_transform_unref (transform); } gsk_gl_render_job_transform_bounds (job, offscreen->bounds, &viewport); @@ -4182,6 +4183,7 @@ gsk_gl_render_job_visit_node_with_offscreen (GskGLRenderJob *job, { GskTransform *transform = gsk_transform_scale (NULL, downscale_x, downscale_y); gsk_gl_render_job_push_modelview (job, transform); + gsk_transform_unref (transform); gsk_gl_render_job_transform_bounds (job, offscreen->bounds, &viewport); } |