gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 89Markdown 11TOML 91930 Sutichaykuna

Fixup for passing style to measure functions

54603379f1342a23a63606a7bbd2674c2a2ded70 · ruwaq Nico Burns · (2 wata ñawpaq) · tayta eab5defe7 · kay commitpi sach'ata qhaway

Semántico sayk'uy

Mana ima sutichaypas t'ikrakurqanchu: qillqalla, yachachiylla utaq willaylla t'ikrakurqan.

1 qillqakuna · +6 −3

diff --git a/src/tree/taffy_tree.rs b/src/tree/taffy_tree.rs
index 7af6ae790..962ba2478 100644
--- a/src/tree/taffy_tree.rs
+++ b/src/tree/taffy_tree.rs
@@ -338,7 +338,8 @@ where
 
 impl<'t, NodeContext, MeasureFunction> LayoutBlockContainer for TaffyView<'t, NodeContext, MeasureFunction>
 where
-    MeasureFunction: FnMut(Size<Option<f32>>, Size<AvailableSpace>, NodeId, Option<&mut NodeContext>) -> Size<f32>,
+    MeasureFunction:
+        FnMut(Size<Option<f32>>, Size<AvailableSpace>, NodeId, Option<&mut NodeContext>, &Style) -> Size<f32>,
 {
     type ContainerStyle<'a> = &'a Style where Self: 'a;
     type ItemStyle<'a> = &'a Style where Self: 'a;
@@ -356,7 +357,8 @@ where
 
 impl<'t, NodeContext, MeasureFunction> LayoutFlexboxContainer for TaffyView<'t, NodeContext, MeasureFunction>
 where
-    MeasureFunction: FnMut(Size<Option<f32>>, Size<AvailableSpace>, NodeId, Option<&mut NodeContext>) -> Size<f32>,
+    MeasureFunction:
+        FnMut(Size<Option<f32>>, Size<AvailableSpace>, NodeId, Option<&mut NodeContext>, &Style) -> Size<f32>,
 {
     type ContainerStyle<'a> = &'a Style where Self: 'a;
     type ItemStyle<'a> = &'a Style where Self: 'a;
@@ -374,7 +376,8 @@ where
 
 impl<'t, NodeContext, MeasureFunction> LayoutGridContainer for TaffyView<'t, NodeContext, MeasureFunction>
 where
-    MeasureFunction: FnMut(Size<Option<f32>>, Size<AvailableSpace>, NodeId, Option<&mut NodeContext>) -> Size<f32>,
+    MeasureFunction:
+        FnMut(Size<Option<f32>>, Size<AvailableSpace>, NodeId, Option<&mut NodeContext>, &Style) -> Size<f32>,
 {
     type ContainerStyle<'a> = &'a Style where Self: 'a;
     type ItemStyle<'a> = &'a Style where Self: 'a;