Commit b13362b3 authored by Timm Bäder's avatar Timm Bäder

separatormenuitem: Don't create label widget in get_label

Calling gtk_menu_item_get_label on a GtkSeparatorMenuItem would
otherwise create a GtkLabel child, increasing the vertical size request
to that of the child label.
parent b68256f7
......@@ -44,11 +44,20 @@
G_DEFINE_TYPE (GtkSeparatorMenuItem, gtk_separator_menu_item, GTK_TYPE_MENU_ITEM)
static const char *
gtk_separator_menu_item_get_label (GtkMenuItem *item)
{
return "";
}
static void
gtk_separator_menu_item_class_init (GtkSeparatorMenuItemClass *class)
{
GTK_CONTAINER_CLASS (class)->child_type = NULL;
GTK_MENU_ITEM_CLASS (class)->get_label = gtk_separator_menu_item_get_label;
gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (class), ATK_ROLE_SEPARATOR);
gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (class), "separator");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment