[gtk/menu-section-title-fixup] popovermenu: Don't put a separator before the first section
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/menu-section-title-fixup] popovermenu: Don't put a separator before the first section
- Date: Tue, 28 Apr 2020 00:28:39 +0000 (UTC)
commit a837b578495e242df60bdc20e9873789f7302834
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 27 20:26:02 2020 -0400
popovermenu: Don't put a separator before the first section
When we have section titles, we were not hiding the
separator before the first section as we should;
fix this.
Fixes: #2672
gtk/gtkmenusectionbox.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c
index e6a55fae55..6a36ae7510 100644
--- a/gtk/gtkmenusectionbox.c
+++ b/gtk/gtkmenusectionbox.c
@@ -135,6 +135,13 @@ gtk_menu_section_box_sync_separators (GtkMenuSectionBox *box,
gtk_widget_set_margin_top (GTK_WIDGET (box->item_box), should_have_top_margin ? 10 : 0);
+ if (has_label)
+ {
+ GtkWidget *separator = gtk_widget_get_first_child (box->separator);
+
+ gtk_widget_set_visible (separator, n_items_before > 0);
+ }
+
if (should_have_separator == has_separator)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]