ui.gadgets.tracks: rewrite available-dim

db4
Eduardo Cavazos 2008-07-15 02:17:13 -05:00
parent 799d541d92
commit 1a04f30c7c
1 changed files with 1 additions and 2 deletions

View File

@ -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