Bring series collation up to speed
This commit is contained in:
parent
86330dac37
commit
01bfa16481
5 changed files with 94 additions and 106 deletions
|
|
@ -79,14 +79,17 @@ impl CollatableSeriesContainer {
|
|||
pub fn new ( series : Vec <Series> ) -> Self {
|
||||
let collated_grid = leak (
|
||||
CollatedSeriesGrid :: new ( series , SeriesSorting :: default () ) ) ;
|
||||
let series_collation_menu = SeriesCollationMenu :: new ( |sorted_by| {
|
||||
collated_grid . set_sorting (sorted_by) ;
|
||||
let series_collation_menu = SeriesCollationMenu :: new ( |sorting| {
|
||||
collated_grid . set_sorting (sorting) ;
|
||||
} ) ;
|
||||
|
||||
let widget = g_box ! (
|
||||
@ orientation : Vertical ,
|
||||
* series_collation_menu . get_widget () ,
|
||||
create_collection_scrolled_window ( collated_grid . get_widget () ) ,
|
||||
scrolled_window ! (
|
||||
@ propagate_natural_height : true ,
|
||||
vertically_filling ! ( * collated_grid . get_widget () ) ,
|
||||
) ,
|
||||
) ;
|
||||
|
||||
Self { collated_grid , widget }
|
||||
|
|
@ -103,10 +106,3 @@ impl Component <Box> for CollatableFilmsContainer {
|
|||
impl Component <Box> for CollatableSeriesContainer {
|
||||
fn get_widget ( & self ) -> & Box { & self . widget }
|
||||
}
|
||||
|
||||
fn create_collection_scrolled_window ( child : & FlowBox ) -> ScrolledWindow {
|
||||
ScrolledWindow :: builder ()
|
||||
. child ( & vertically_filling ! ( * child ) )
|
||||
. propagate_natural_height (true)
|
||||
. build ()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue