File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,8 @@ def resolve_box_models(
203203 fraction_zero = Fraction (0 )
204204 margin_size = size - margin
205205
206+ margins = [widget .styles .margin .totals for widget in widgets ]
207+
206208 # Fixed box models
207209 box_models : list [BoxModel | None ] = [
208210 (
@@ -211,11 +213,13 @@ def resolve_box_models(
211213 else widget ._get_box_model (
212214 size ,
213215 viewport_size ,
214- max (fraction_zero , fraction_width - widget . styles . margin . width ),
215- max (fraction_zero , fraction_height - widget . styles . margin . height ),
216+ max (fraction_zero , fraction_width - margin_width ),
217+ max (fraction_zero , fraction_height - margin_height ),
216218 )
217219 )
218- for (_dimension , widget ) in zip (dimensions , widgets )
220+ for (_dimension , widget , (margin_width , margin_height )) in zip (
221+ dimensions , widgets , margins
222+ )
219223 ]
220224
221225 if None not in box_models :
You can’t perform that action at this time.
0 commit comments