376 |
376 |
377 info startX:(((diffw / 2) + (insets left)) asInteger). |
377 info startX:(((diffw / 2) + (insets left)) asInteger). |
378 info startY:(((diffh / 2) + (insets top)) asInteger). |
378 info startY:(((diffh / 2) + (insets top)) asInteger). |
379 |
379 |
380 subViews do:[ :child | |
380 subViews do:[ :child | |
381 |rW rH| |
381 |rW rH minWidth minHeight| |
382 |
382 |
383 c := self constraints:child. |
383 c := self constraints:child. |
|
384 minWidth := info minWidth. |
|
385 minHeight := info minHeight. |
384 |
386 |
385 r setLeft:(info startX). |
387 r setLeft:(info startX). |
386 0 to:((c tempX) - 1) do:[ :i | r setLeft:((r left) + ((info minWidth) at:(i + 1))). ]. |
388 0 to:((c tempX) - 1) do:[ :i | r setLeft:((r left) + (minWidth at:(i + 1))). ]. |
387 |
389 |
388 r setTop:(info startY). |
390 r setTop:(info startY). |
389 0 to:((c tempY) - 1) do:[ :i | r setTop:((r top) + ((info minHeight) at:(i + 1))). ]. |
391 0 to:((c tempY) - 1) do:[ :i | r setTop:((r top) + (minHeight at:(i + 1))). ]. |
390 |
392 |
391 r width:0. |
393 r width:0. |
392 (c tempX) to:((c tempX) + (c tempWidth) - 1) do:[ :i | |
394 (c tempX) to:((c tempX) + (c tempWidth) - 1) do:[ :i | |
393 r width:((r width) + ((info minWidth) at:(i + 1))). |
395 r width:((r width) + (minWidth at:(i + 1))). |
394 ]. |
396 ]. |
395 |
397 |
396 r height:0. |
398 r height:0. |
397 (c tempY) to:((c tempY) + (c tempHeight) - 1) do:[ :i | |
399 (c tempY) to:((c tempY) + (c tempHeight) - 1) do:[ :i | |
398 r height:((r height) + ((info minHeight) at:(i + 1))). |
400 r height:((r height) + (minHeight at:(i + 1))). |
399 ]. |
401 ]. |
400 |
402 |
401 self adjustForGravity:c in:r. |
403 self adjustForGravity:c in:r. |
402 |
404 |
403 "/ If the window is too small to be interesting then |
405 "/ If the window is too small to be interesting then |