From 4375c7f4ceecbb00a4af4e02baba3396a8d4ca82 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Fri, 15 Dec 2017 21:00:51 +0200 Subject: [PATCH] EpisodeWidget: Added a separator in each widget. This is a work around since list_box_set_header_func is not yet available in the gtk-rs bindings. --- hammond-gtk/resources/gtk/episode_widget.ui | 17 ++++++++++++++--- hammond-gtk/src/widgets/episode.rs | 3 ++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/hammond-gtk/resources/gtk/episode_widget.ui b/hammond-gtk/resources/gtk/episode_widget.ui index cc2d9d5..527dee8 100644 --- a/hammond-gtk/resources/gtk/episode_widget.ui +++ b/hammond-gtk/resources/gtk/episode_widget.ui @@ -6,7 +6,17 @@ True False vertical - 5 + + + True + False + + + False + True + 0 + + True @@ -244,7 +254,8 @@ True True - 0 + 5 + 1 @@ -255,7 +266,7 @@ False True 5 - 1 + 2 diff --git a/hammond-gtk/src/widgets/episode.rs b/hammond-gtk/src/widgets/episode.rs index 921696f..fb166a3 100644 --- a/hammond-gtk/src/widgets/episode.rs +++ b/hammond-gtk/src/widgets/episode.rs @@ -273,7 +273,8 @@ pub fn episodes_listbox(pd: &Podcast) -> Result { let list = gtk::ListBox::new(); episodes.into_iter().for_each(|mut ep| { let widget = EpisodeWidget::new_initialized(&mut ep, pd); - list.add(&widget.container) + list.add(&widget.container); + list.add(>k::Separator::new(gtk::Orientation::Vertical)) }); list.set_vexpand(false);