allow window pref-dim to be provided in world-attributes
parent
bd62fb22aa
commit
9dc5d18b1c
|
@ -39,7 +39,8 @@ TUPLE: track < pack sizes ;
|
||||||
M: track layout* ( track -- ) dup track-layout pack-layout ;
|
M: track layout* ( track -- ) dup track-layout pack-layout ;
|
||||||
|
|
||||||
: track-pref-dims-1 ( track -- dim )
|
: track-pref-dims-1 ( track -- dim )
|
||||||
children>> pref-dims max-dim ;
|
[ children>> pref-dims max-dim ]
|
||||||
|
[ pref-dim>> { 0 0 } or ] bi vmax ;
|
||||||
|
|
||||||
: track-pref-dims-2 ( track -- dim )
|
: track-pref-dims-2 ( track -- dim )
|
||||||
[
|
[
|
||||||
|
|
|
@ -50,7 +50,8 @@ TUPLE: world-attributes
|
||||||
status
|
status
|
||||||
gadgets
|
gadgets
|
||||||
{ pixel-format-attributes initial: $ default-world-pixel-format-attributes }
|
{ pixel-format-attributes initial: $ default-world-pixel-format-attributes }
|
||||||
{ window-controls initial: $ default-world-window-controls } ;
|
{ window-controls initial: $ default-world-window-controls }
|
||||||
|
pref-dim ;
|
||||||
|
|
||||||
: <world-attributes> ( -- world-attributes )
|
: <world-attributes> ( -- world-attributes )
|
||||||
world-attributes new ; inline
|
world-attributes new ; inline
|
||||||
|
@ -133,6 +134,7 @@ M: world request-focus-on ( child gadget -- )
|
||||||
[ initial-background-color >>background-color ]
|
[ initial-background-color >>background-color ]
|
||||||
[ grab-input?>> >>grab-input? ]
|
[ grab-input?>> >>grab-input? ]
|
||||||
[ gadgets>> [ 1 track-add ] each ]
|
[ gadgets>> [ 1 track-add ] each ]
|
||||||
|
[ pref-dim>> >>pref-dim ]
|
||||||
} cleave ;
|
} cleave ;
|
||||||
|
|
||||||
: <world> ( world-attributes -- world )
|
: <world> ( world-attributes -- world )
|
||||||
|
|
Loading…
Reference in New Issue