Wrap original names, add todo about grid item layout

This commit is contained in:
Reinout Meliesie 2026-01-29 13:40:36 +01:00
commit 6ca3ab6a50
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
2 changed files with 12 additions and 0 deletions

View file

@ -74,6 +74,9 @@ impl FactoryComponent for FilmGridItem {
set_paintable: self.poster.as_ref(), set_paintable: self.poster.as_ref(),
}, },
// TODO: Wrap widgets below in a box with a set height and center everything vertically
// again so that it's not all at the top of the button.
#[name="name"] #[name="name"]
Label { Label {
#[wrap(Some)] #[wrap(Some)]
@ -92,6 +95,11 @@ impl FactoryComponent for FilmGridItem {
#[name="original_name"] #[name="original_name"]
Label { Label {
set_wrap: true,
// See above.
set_max_width_chars: 1,
// Keeps wrapped text centered.
set_justify: Justification::Center,
set_visible: self.film.original_name.is_some(), set_visible: self.film.original_name.is_some(),
set_cond_label: self.film.original_name.as_deref(), set_cond_label: self.film.original_name.as_deref(),
}, },

View file

@ -85,6 +85,10 @@ impl FactoryComponent for SeriesGridItem {
#[name="original_name"] #[name="original_name"]
Label { Label {
set_wrap: true,
// See above.
set_max_width_chars: 1,
// Keeps wrapped text centered.
set_visible: self.series.original_name.is_some(), set_visible: self.series.original_name.is_some(),
set_cond_label: self.series.original_name.as_deref(), set_cond_label: self.series.original_name.as_deref(),
}, },