chore: update taffy crate to crates.io release

This commit is contained in:
Michael Aaron Murphy 2025-09-30 22:18:02 +02:00 committed by Michael Murphy
parent df9df40963
commit 6a0c06a368
3 changed files with 8 additions and 12 deletions

View file

@ -133,6 +133,7 @@ serde = { version = "1.0.219", features = ["derive"] }
slotmap = "1.0.7" slotmap = "1.0.7"
smol = { version = "2.0.2", optional = true } smol = { version = "2.0.2", optional = true }
thiserror = "2.0.16" thiserror = "2.0.16"
taffy = { version = "0.9.1", features = ["grid"] }
tokio = { version = "1.47.1", optional = true } tokio = { version = "1.47.1", optional = true }
tracing = "0.1.41" tracing = "0.1.41"
unicode-segmentation = "1.12" unicode-segmentation = "1.12"
@ -205,11 +206,6 @@ optional = true
version = "0.11" version = "0.11"
optional = true optional = true
[dependencies.taffy]
git = "https://github.com/DioxusLabs/taffy"
rev = "7781c70"
features = ["grid"]
[workspace] [workspace]
members = [ members = [
"cosmic-config", "cosmic-config",

View file

@ -44,7 +44,7 @@ pub fn resolve<Message>(
min_size: taffy::geometry::Size { min_size: taffy::geometry::Size {
width: length(max_size.width), width: length(max_size.width),
height: Dimension::Auto, height: Dimension::auto(),
}, },
align_items, align_items,
@ -71,7 +71,7 @@ pub fn resolve<Message>(
let c_size = child_widget.size(); let c_size = child_widget.size();
let (width, flex_grow, justify_self) = match c_size.width { let (width, flex_grow, justify_self) = match c_size.width {
Length::Fill | Length::FillPortion(_) => { Length::Fill | Length::FillPortion(_) => {
(Dimension::Auto, 1.0, Some(AlignItems::Stretch)) (Dimension::auto(), 1.0, Some(AlignItems::Stretch))
} }
_ => (length(size.width), 0.0, None), _ => (length(size.width), 0.0, None),
}; };
@ -82,15 +82,15 @@ pub fn resolve<Message>(
min_size: taffy::geometry::Size { min_size: taffy::geometry::Size {
width: match min_item_width { width: match min_item_width {
Some(width) => length(size.width.min(width)), Some(width) => length(size.width.min(width)),
None => Dimension::Auto, None => Dimension::auto(),
}, },
height: Dimension::Auto, height: Dimension::auto(),
}, },
size: taffy::geometry::Size { size: taffy::geometry::Size {
width, width,
height: match c_size.height { height: match c_size.height {
Length::Fill | Length::FillPortion(_) => Dimension::Auto, Length::Fill | Length::FillPortion(_) => Dimension::auto(),
_ => length(size.height), _ => length(size.height),
}, },
}, },

View file

@ -48,7 +48,7 @@ pub fn resolve<Message>(
let c_size = child_widget.size(); let c_size = child_widget.size();
let (width, flex_grow, justify_self) = match c_size.width { let (width, flex_grow, justify_self) = match c_size.width {
Length::Fill | Length::FillPortion(_) => { Length::Fill | Length::FillPortion(_) => {
(Dimension::Auto, 1.0, Some(AlignItems::Stretch)) (Dimension::auto(), 1.0, Some(AlignItems::Stretch))
} }
_ => (length(size.width), 0.0, None), _ => (length(size.width), 0.0, None),
}; };
@ -72,7 +72,7 @@ pub fn resolve<Message>(
size: taffy::geometry::Size { size: taffy::geometry::Size {
width, width,
height: match c_size.height { height: match c_size.height {
Length::Fill | Length::FillPortion(_) => Dimension::Auto, Length::Fill | Length::FillPortion(_) => Dimension::auto(),
_ => length(size.height), _ => length(size.height),
}, },
}, },