forked from AuroraMiddleware/gtk
Merge branch 'menu-section-title' into 'master'
Menu section title See merge request GNOME/gtk!1735
This commit is contained in:
commit
c09b5ea7b4
@ -612,24 +612,21 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item,
|
||||
GtkWidget *separator;
|
||||
GtkWidget *title;
|
||||
|
||||
box->separator = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
box->separator = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_ref_sink (box->separator);
|
||||
|
||||
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_widget_set_valign (separator, GTK_ALIGN_CENTER);
|
||||
gtk_container_add (GTK_CONTAINER (box->separator), separator);
|
||||
gtk_size_group_add_widget (box->indicators, separator);
|
||||
|
||||
title = gtk_label_new (label);
|
||||
g_object_bind_property (item, "label", title, "label", G_BINDING_SYNC_CREATE);
|
||||
gtk_widget_add_css_class (title, GTK_STYLE_CLASS_SEPARATOR);
|
||||
gtk_widget_set_halign (title, GTK_ALIGN_START);
|
||||
gtk_container_add (GTK_CONTAINER (box->separator), title);
|
||||
|
||||
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_widget_set_valign (separator, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_hexpand (separator, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (box->separator), separator);
|
||||
|
||||
title = gtk_label_new (label);
|
||||
g_object_bind_property (item, "label", title, "label", G_BINDING_SYNC_CREATE);
|
||||
gtk_widget_add_css_class (title, GTK_STYLE_CLASS_SEPARATOR);
|
||||
gtk_widget_set_halign (title, GTK_ALIGN_START);
|
||||
gtk_label_set_xalign (GTK_LABEL (title), 0.0);
|
||||
gtk_widget_add_css_class (title, GTK_STYLE_CLASS_TITLE);
|
||||
gtk_container_add (GTK_CONTAINER (box->separator), title);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4450,6 +4450,11 @@ popover.menu {
|
||||
|
||||
&:selected { @extend %selected_items; }
|
||||
}
|
||||
|
||||
& label.title {
|
||||
font-weight: bold;
|
||||
padding: 4px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
statusbar {
|
||||
|
Loading…
Reference in New Issue
Block a user