UI macro syntax now differentiates at-properties from arguments
This commit is contained in:
parent
ed18e738eb
commit
ce70725b60
8 changed files with 80 additions and 80 deletions
|
|
@ -25,9 +25,9 @@ pub struct CollatedSeriesGrid {
|
|||
impl CollatedFilmsGrid {
|
||||
pub fn new ( films : Vec <Film> , sorting : FilmsSorting ) -> Self {
|
||||
let grid_widget = flow_box ! (
|
||||
@ orientation : Horizontal ,
|
||||
@ homogeneous : true ,
|
||||
@ selection_mode : SelectionMode :: None ,
|
||||
@ orientation : Horizontal ;
|
||||
@ homogeneous : true ;
|
||||
@ selection_mode : SelectionMode :: None ;
|
||||
) ;
|
||||
let film_widget_pairs = RefCell :: new ( vec ! () ) ;
|
||||
|
||||
|
|
@ -78,9 +78,9 @@ impl CollatedFilmsGrid {
|
|||
impl CollatedSeriesGrid {
|
||||
pub fn new ( series : Vec <Series> , sorting : SeriesSorting ) -> Self {
|
||||
let grid_widget = flow_box ! (
|
||||
@ orientation : Horizontal ,
|
||||
@ homogeneous : true ,
|
||||
@ selection_mode : SelectionMode :: None ,
|
||||
@ orientation : Horizontal ;
|
||||
@ homogeneous : true ;
|
||||
@ selection_mode : SelectionMode :: None ;
|
||||
) ;
|
||||
let series_widget_pairs = RefCell :: new ( vec ! () ) ;
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ fn create_collection_item (
|
|||
container . append (
|
||||
& Label :: builder ()
|
||||
. label (name)
|
||||
. attributes ( & pango_attributes ! ( @ scale : SCALE_LARGE , @ weight : Bold , ) )
|
||||
. attributes ( & pango_attributes ! ( @ scale : SCALE_LARGE ; @ weight : Bold ; ) )
|
||||
. justify ( Justification :: Center )
|
||||
. wrap (true)
|
||||
. max_width_chars (1) // Not the actual limit, used instead to wrap more aggressively
|
||||
|
|
@ -203,18 +203,18 @@ fn create_collection_item (
|
|||
|
||||
fn create_film_details ( film : & Film ) -> Box {
|
||||
g_box ! (
|
||||
@ orientation : Horizontal ,
|
||||
@ halign : Center ,
|
||||
@ spacing : 20 ,
|
||||
@ orientation : Horizontal ;
|
||||
@ halign : Center ;
|
||||
@ spacing : 20 ;
|
||||
label ! ( film . release_date . as_str () ) ,
|
||||
label ! ( format ! ( "{}m" , film . runtime_minutes ) . as_str () ) ,
|
||||
)
|
||||
}
|
||||
fn create_series_details ( series : & Series ) -> Box {
|
||||
g_box ! (
|
||||
@ orientation : Horizontal ,
|
||||
@ halign : Center ,
|
||||
@ spacing : 20 ,
|
||||
@ orientation : Horizontal ;
|
||||
@ halign : Center ;
|
||||
@ spacing : 20 ;
|
||||
// TODO
|
||||
label ! ("????") ,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue