File tree 1 file changed +7
-3
lines changed
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(
203
203
fraction_zero = Fraction (0 )
204
204
margin_size = size - margin
205
205
206
+ margins = [widget .styles .margin .totals for widget in widgets ]
207
+
206
208
# Fixed box models
207
209
box_models : list [BoxModel | None ] = [
208
210
(
@@ -211,11 +213,13 @@ def resolve_box_models(
211
213
else widget ._get_box_model (
212
214
size ,
213
215
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 ),
216
218
)
217
219
)
218
- for (_dimension , widget ) in zip (dimensions , widgets )
220
+ for (_dimension , widget , (margin_width , margin_height )) in zip (
221
+ dimensions , widgets , margins
222
+ )
219
223
]
220
224
221
225
if None not in box_models :
You can’t perform that action at this time.
0 commit comments