Replace custom widget macros with Relm4 view macro based ones
Also move margin styling to the CSS file.
This commit is contained in:
parent
6df7530b33
commit
6446d43d76
9 changed files with 299 additions and 435 deletions
|
|
@ -1,7 +1,7 @@
|
|||
mod collated_grid ;
|
||||
mod collation_menu ;
|
||||
|
||||
use gtk4 :: Box ;
|
||||
use gtk4 :: { Box , ScrolledWindow } ;
|
||||
use gtk4 :: Orientation :: * ;
|
||||
use gtk4 :: prelude :: * ;
|
||||
use std :: cmp :: * ;
|
||||
|
|
@ -73,14 +73,18 @@ impl < A : MediaAdapter > CollatableMediaContainer <A> {
|
|||
|sorting| collated_grid . set_sorting (sorting) ,
|
||||
) ;
|
||||
|
||||
let widget = g_box ! (
|
||||
@ orientation : Vertical ;
|
||||
collation_menu . get_widget () ,
|
||||
& scrolled_window ! (
|
||||
@ propagate_natural_height : true ;
|
||||
& vertically_filling ! ( collated_grid . get_widget () ) ,
|
||||
) ,
|
||||
) ;
|
||||
let widget = view_expr ! {
|
||||
gtk4 :: Box {
|
||||
set_orientation : Vertical ,
|
||||
append : collation_menu . get_widget () ,
|
||||
append : & view_expr ! {
|
||||
ScrolledWindow {
|
||||
set_propagate_natural_height : true ,
|
||||
set_child : Some ( & vertical_filler ( collated_grid . get_widget () ) ) ,
|
||||
}
|
||||
} ,
|
||||
}
|
||||
} ;
|
||||
|
||||
Self { collated_grid, widget }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue