mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
gtk-demo: Tweak images demo
Use our own logo instead of the gtk3-demo one, and tweak the headings to refledct what we show.
This commit is contained in:
parent
354f2b65fa
commit
a3c9f8594a
@ -234,6 +234,7 @@
|
|||||||
<file>alphatest.png</file>
|
<file>alphatest.png</file>
|
||||||
<file>floppybuddy.gif</file>
|
<file>floppybuddy.gif</file>
|
||||||
<file>gtk-logo.webm</file>
|
<file>gtk-logo.webm</file>
|
||||||
|
<file alias="org.gtk.Demo4.svg">data/scalable/apps/org.gtk.Demo4.svg</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
<gresource prefix="/video-player">
|
<gresource prefix="/video-player">
|
||||||
<file>bbb.png</file>
|
<file>bbb.png</file>
|
||||||
|
@ -347,7 +347,7 @@ do_images (GtkWidget *do_widget)
|
|||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||||
gtk_box_append (GTK_BOX (hbox), vbox);
|
gtk_box_append (GTK_BOX (hbox), vbox);
|
||||||
|
|
||||||
label = gtk_label_new ("Image loaded from a file");
|
label = gtk_label_new ("Image from a resource");
|
||||||
gtk_widget_add_css_class (label, "heading");
|
gtk_widget_add_css_class (label, "heading");
|
||||||
gtk_box_append (GTK_BOX (vbox), label);
|
gtk_box_append (GTK_BOX (vbox), label);
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ do_images (GtkWidget *do_widget)
|
|||||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_box_append (GTK_BOX (vbox), frame);
|
gtk_box_append (GTK_BOX (vbox), frame);
|
||||||
|
|
||||||
image = gtk_image_new_from_icon_name ("gtk3-demo");
|
image = gtk_image_new_from_resource ("/images/org.gtk.Demo4.svg");
|
||||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||||
|
|
||||||
gtk_frame_set_child (GTK_FRAME (frame), image);
|
gtk_frame_set_child (GTK_FRAME (frame), image);
|
||||||
@ -364,7 +364,7 @@ do_images (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* Animation */
|
/* Animation */
|
||||||
|
|
||||||
label = gtk_label_new ("Animation loaded from a file");
|
label = gtk_label_new ("Animation from a resource");
|
||||||
gtk_widget_add_css_class (label, "heading");
|
gtk_widget_add_css_class (label, "heading");
|
||||||
gtk_box_append (GTK_BOX (vbox), label);
|
gtk_box_append (GTK_BOX (vbox), label);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user