mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
demo: Ensure .image-button on header bar buttons
This commit is contained in:
parent
5d59415c2d
commit
7ebd9291d9
@ -10,12 +10,8 @@
|
||||
<object class="GtkButton" id="reset">
|
||||
<property name="receives-default">1</property>
|
||||
<property name="tooltip-text">Reset</property>
|
||||
<property name="icon-name">view-refresh-symbolic</property>
|
||||
<signal name="clicked" handler="font_features_reset_features" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">view-refresh-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -18,8 +18,6 @@ do_headerbar (GtkWidget *do_widget)
|
||||
GtkWidget *header;
|
||||
GtkWidget *button;
|
||||
GtkWidget *box;
|
||||
GtkWidget *image;
|
||||
GIcon *icon;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
@ -32,20 +30,14 @@ do_headerbar (GtkWidget *do_widget)
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
|
||||
button = gtk_button_new ();
|
||||
icon = g_themed_icon_new ("mail-send-receive-symbolic");
|
||||
image = gtk_image_new_from_gicon (icon);
|
||||
g_object_unref (icon);
|
||||
gtk_button_set_child (GTK_BUTTON (button), image);
|
||||
button = gtk_button_new_from_icon_name ("mail-send-receive-symbolic");
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_widget_add_css_class (box, "linked");
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_child (GTK_BUTTON (button), gtk_image_new_from_icon_name ("go-previous-symbolic"));
|
||||
button = gtk_button_new_from_icon_name ("go-previous-symbolic");
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_child (GTK_BUTTON (button), gtk_image_new_from_icon_name ("go-next-symbolic"));
|
||||
button = gtk_button_new_from_icon_name ("go-next-symbolic");
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), box);
|
||||
|
Loading…
Reference in New Issue
Block a user