From 1f422a14127126781fc70ee596f20a1591fdaad1 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Tue, 15 Jul 2008 02:38:04 -0500 Subject: [PATCH] ui.gadgets.tracks: rewrite track-pref-dims-2 --- extra/ui/gadgets/tracks/tracks.factor | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extra/ui/gadgets/tracks/tracks.factor b/extra/ui/gadgets/tracks/tracks.factor index 296385bfb8..7f0e38bff7 100644 --- a/extra/ui/gadgets/tracks/tracks.factor +++ b/extra/ui/gadgets/tracks/tracks.factor @@ -33,8 +33,10 @@ M: track layout* ( track -- ) dup track-layout pack-layout ; : track-pref-dims-1 ( track -- dim ) children>> pref-dims max-dim ; : track-pref-dims-2 ( track -- dim ) - dup gadget-children pref-dims swap normalized-sizes - [ [ v/n ] when* ] 2map max-dim [ >fixnum ] map ; + [ children>> pref-dims ] [ normalized-sizes ] bi + [ [ v/n ] when* ] 2map + max-dim + [ >fixnum ] map ; M: track pref-dim* ( gadget -- dim ) [ track-pref-dims-1 ]