widget/toplevel_item: Rename to size_cross_nth; take index argument

Name is a bit awkward, but useful for other purposes.
This commit is contained in:
Ian Douglas Scott 2025-04-17 13:45:55 -07:00
parent 4637fcb655
commit bcb68ab054
3 changed files with 22 additions and 16 deletions

View file

@ -327,7 +327,7 @@ fn toplevel_preview(toplevel: &Toplevel, is_being_dragged: bool) -> cosmic::Elem
}
.align_y(iced::Alignment::Center);
let alpha = if is_being_dragged { 0.5 } else { 1.0 };
crate::widgets::toplevel_item(
crate::widgets::size_cross_nth(
vec![
row![
widget::button::custom(label)
@ -368,6 +368,7 @@ fn toplevel_preview(toplevel: &Toplevel, is_being_dragged: bool) -> cosmic::Elem
.into(),
],
Axis::Vertical,
1, // Allocate width to match capture image
)
//.spacing(4)
//.align_items(iced::Alignment::Center)