summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
78a3728)
Adds the #GtkImage widget to the menu item (act like #GtkBin) and sets the stylename 'empathy-smiley-menu-item'.
The style of the menu item can be changed with CSS (empathy.css > .empathy-smiley-menu-item).
https://bugzilla.gnome.org/show_bug.cgi?id=736369
-GtkButtonBox-child-internal-pad-x: 0;
-GtkButtonBox-child-internal-pad-y: 0;
}
-GtkButtonBox-child-internal-pad-x: 0;
-GtkButtonBox-child-internal-pad-y: 0;
}
+
+.empathy-smiley-menu-item
+{
+ padding: 8px 12px;
+}
smiley = l->data;
image = gtk_image_new_from_pixbuf (smiley->pixbuf);
smiley = l->data;
image = gtk_image_new_from_pixbuf (smiley->pixbuf);
- item = gtk_image_menu_item_new_with_label ("");
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
- gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (item), TRUE);
+ item = gtk_image_menu_item_new ();
+ gtk_style_context_add_class (gtk_widget_get_style_context (item),
+ "empathy-smiley-menu-item");
+ gtk_container_add (GTK_CONTAINER (item), image);
gtk_menu_attach (GTK_MENU (menu), item,
x, x + 1, y, y + 1);
gtk_menu_attach (GTK_MENU (menu), item,
x, x + 1, y, y + 1);