Merge branch 'content-fit-since' into 'main'

picture: Fix Since and Deprecated annotations for content-fit

See merge request GNOME/gtk!4897
This commit is contained in:
Emmanuele Bassi 2022-07-25 11:45:43 +00:00
commit 61bf5ac009

View File

@ -456,6 +456,8 @@ gtk_picture_class_init (GtkPictureClass *class)
* GtkPicture:content-fit: (attributes org.gtk.Property.get=gtk_picture_get_content_fit org.gtk.Property.set=gtk_picture_set_content_fit) * GtkPicture:content-fit: (attributes org.gtk.Property.get=gtk_picture_get_content_fit org.gtk.Property.set=gtk_picture_set_content_fit)
* *
* How the content should be resized to fit inside the `GtkPicture`. * How the content should be resized to fit inside the `GtkPicture`.
*
* Since: 4.8
*/ */
properties[PROP_CONTENT_FIT] = properties[PROP_CONTENT_FIT] =
g_param_spec_enum ("content-fit", NULL, NULL, g_param_spec_enum ("content-fit", NULL, NULL,
@ -884,9 +886,9 @@ gtk_picture_get_paintable (GtkPicture *self)
* the contents will be stretched over the picture's whole area. * the contents will be stretched over the picture's whole area.
* *
* Deprecated: 4.8: Use [method@Gtk.Picture.set_content_fit] instead. If still * Deprecated: 4.8: Use [method@Gtk.Picture.set_content_fit] instead. If still
* used, this method will always set the [property@Gtk.Picture:content-fit] * used, this method will always set the [property@Gtk.Picture:content-fit]
* property to `GTK_CONTENT_FIT_CONTAIN` if @keep_aspect_ratio is true, * property to `GTK_CONTENT_FIT_CONTAIN` if @keep_aspect_ratio is true,
* otherwise it will set it to `GTK_CONTENT_FIT_FILL`. * otherwise it will set it to `GTK_CONTENT_FIT_FILL`.
*/ */
void void
gtk_picture_set_keep_aspect_ratio (GtkPicture *self, gtk_picture_set_keep_aspect_ratio (GtkPicture *self,
@ -907,8 +909,8 @@ gtk_picture_set_keep_aspect_ratio (GtkPicture *self,
* Returns: %TRUE if the self tries to keep the contents' aspect ratio * Returns: %TRUE if the self tries to keep the contents' aspect ratio
* *
* Deprecated: 4.8: Use [method@Gtk.Picture.get_content_fit] instead. This will * Deprecated: 4.8: Use [method@Gtk.Picture.get_content_fit] instead. This will
* now return `FALSE` only if [property@Gtk.Picture:content-fit] is * now return `FALSE` only if [property@Gtk.Picture:content-fit] is
* `GTK_CONTENT_FIT_FILL`. Returns `TRUE` otherwise. * `GTK_CONTENT_FIT_FILL`. Returns `TRUE` otherwise.
*/ */
gboolean gboolean
gtk_picture_get_keep_aspect_ratio (GtkPicture *self) gtk_picture_get_keep_aspect_ratio (GtkPicture *self)
@ -974,6 +976,8 @@ gtk_picture_get_can_shrink (GtkPicture *self)
* Sets how the content should be resized to fit the `GtkPicture`. * Sets how the content should be resized to fit the `GtkPicture`.
* *
* See [enum@Gtk.ContentFit] for details. * See [enum@Gtk.ContentFit] for details.
*
* Since: 4.8
*/ */
void void
gtk_picture_set_content_fit (GtkPicture *self, gtk_picture_set_content_fit (GtkPicture *self,
@ -1008,6 +1012,8 @@ gtk_picture_set_content_fit (GtkPicture *self,
* See [enum@Gtk.ContentFit] for details. * See [enum@Gtk.ContentFit] for details.
* *
* Returns: the content fit mode * Returns: the content fit mode
*
* Since: 4.8
*/ */
GtkContentFit GtkContentFit
gtk_picture_get_content_fit (GtkPicture *self) gtk_picture_get_content_fit (GtkPicture *self)