From 1a04f30c7ce8187fadbab0aa71cda400ae2df05a Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Tue, 15 Jul 2008 02:17:13 -0500 Subject: [PATCH] ui.gadgets.tracks: rewrite available-dim --- extra/ui/gadgets/tracks/tracks.factor | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extra/ui/gadgets/tracks/tracks.factor b/extra/ui/gadgets/tracks/tracks.factor index af54b3c47c..9ab3c5200f 100644 --- a/extra/ui/gadgets/tracks/tracks.factor +++ b/extra/ui/gadgets/tracks/tracks.factor @@ -23,8 +23,7 @@ TUPLE: track < pack sizes ; dup gadget-children swap track-sizes { 0 0 } [ [ drop { 0 0 } ] [ pref-dim ] if v+ ] 2reduce ; -: available-dim ( track -- dim ) - dup rect-dim swap alloted-dim v- ; +: available-dim ( track -- dim ) [ dim>> ] [ alloted-dim ] bi v- ; : track-layout ( track -- sizes ) dup available-dim over gadget-children rot normalized-sizes