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

@ -1,9 +1,9 @@
use {
gtk4 :: {
* ,
Align :: * ,
Orientation :: * ,
gdk :: Texture ,
Align :: * , Orientation :: * ,
gdk :: * ,
pango :: { * , Weight :: * } ,
prelude :: * ,
} ,
std :: { cell :: * , iter :: * , path :: Path } ,
@ -177,8 +177,8 @@ fn create_collection_item (
container . append (
& Label :: builder ()
. label ( format ! ( "<span size='large' weight='bold'>{}</span>" , name ) )
. use_markup (true)
. label (name)
. 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