Fix collection item title Pango syntax

This commit is contained in:
Reinout Meliesie 2025-02-04 14:45:57 +01:00
commit ed18e738eb
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
2 changed files with 20 additions and 5 deletions

View file

@ -145,6 +145,20 @@ macro_rules ! vertically_filling { ( $ child : expr ) => {
)
} }
macro_rules ! pango_attributes { (
$ ( @ scale : $ scale : expr , ) ?
$ ( @ weight : $ weight : expr , ) ?
) => { {
let attributes = gtk4 :: pango :: AttrList :: new () ;
# [ allow (unused_mut) ] let mut font_description = gtk4 :: pango :: FontDescription :: new () ;
$ ( attributes . insert ( gtk4 :: pango :: AttrFloat :: new_scale ( $ scale ) ) ; ) ?
$ ( font_description . set_weight ( $ weight ) ; ) ?
attributes . insert ( gtk4 :: pango :: AttrFontDesc :: new ( & font_description ) ) ;
attributes
} } }
pub (crate) use {
@ -162,4 +176,5 @@ pub (crate) use {
bin ,
application_window ,
vertically_filling ,
pango_attributes ,
} ;