[gnome-contacts/wip/cdavis/hdy-style-updates: 7/8] editor-persona: Use libhandy list styling




commit f49c9143d02fe3ca10649fb79aa3118fc5bba500
Author: Christopher Davis <brainblasted disroot org>
Date:   Fri Feb 5 21:49:34 2021 -0800

    editor-persona: Use libhandy list styling

 src/contacts-editor-persona.vala | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/src/contacts-editor-persona.vala b/src/contacts-editor-persona.vala
index cc0fe488..f0888a07 100644
--- a/src/contacts-editor-persona.vala
+++ b/src/contacts-editor-persona.vala
@@ -47,24 +47,9 @@ public class Contacts.EditorPersona : Gtk.Box {
     this.header = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
     add (this.header);
 
-    var frame = new Gtk.Frame (null);
     this.content = new Gtk.ListBox ();
-    this.content.set_header_func (list_box_update_header_func);
-    frame.add (this.content);
-    add (frame);
-  }
-
-  private void list_box_update_header_func (Gtk.ListBoxRow row, Gtk.ListBoxRow? before) {
-    if (before == null) {
-      row.set_header (null);
-      return;
-    }
-
-    if (row.get_header () == null) {
-      var header = new Gtk.Separator (Gtk.Orientation.HORIZONTAL);
-      header.show ();
-      row.set_header (header);
-    }
+    this.content.get_style_context ().add_class ("content");
+    add (this.content);
   }
 
   public EditorPersona (Persona persona, IndividualAggregator aggregator) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]