mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
fishbowl: Use a GtkPicture for videos
This commit is contained in:
parent
911627fa0b
commit
d246abd085
@ -134,7 +134,9 @@ static GtkWidget *
|
|||||||
create_video (void)
|
create_video (void)
|
||||||
{
|
{
|
||||||
GtkMediaStream *stream = gtk_media_file_new_for_resource ("/images/gtk-logo.webm");
|
GtkMediaStream *stream = gtk_media_file_new_for_resource ("/images/gtk-logo.webm");
|
||||||
GtkWidget *w = gtk_image_new_from_paintable (GDK_PAINTABLE (stream));
|
GtkWidget *w = gtk_picture_new_for_paintable (GDK_PAINTABLE (stream));
|
||||||
|
|
||||||
|
gtk_widget_set_size_request (w, 64, 64);
|
||||||
gtk_media_stream_set_loop (stream, TRUE);
|
gtk_media_stream_set_loop (stream, TRUE);
|
||||||
gtk_media_stream_play (stream);
|
gtk_media_stream_play (stream);
|
||||||
g_object_unref (stream);
|
g_object_unref (stream);
|
||||||
|
Loading…
Reference in New Issue
Block a user