UISpecificationTool.st
changeset 1351 811686e8acab
parent 1344 8bde5f1b8600
child 1359 ea946edbf5fb
equal deleted inserted replaced
1350:4e6bdf86b9ac 1351:811686e8acab
   920 
   920 
   921 !
   921 !
   922 
   922 
   923 scrolledView:aView
   923 scrolledView:aView
   924     "set the view to be scrolled"
   924     "set the view to be scrolled"
   925     |scr|
   925     |scr theOneComponent y|
   926 
   926 
   927     scrolledView == aView ifTrue:[^ self].
   927     scrolledView == aView ifTrue:[^ self].
   928 
   928 
   929     scrolledView notNil ifTrue:[scrolledView unmap].
   929     scrolledView notNil ifTrue:[scrolledView unmap].
   930 
   930 
   934 
   934 
   935     scrolledView superView == outerFrame ifFalse:[
   935     scrolledView superView == outerFrame ifFalse:[
   936         scrolledView borderWidth:0; level:0.
   936         scrolledView borderWidth:0; level:0.
   937 
   937 
   938         outerFrame addSubView:scrolledView.
   938         outerFrame addSubView:scrolledView.
   939         scrolledView origin:0@0 corner:1.0 @ (scrolledView preferredExtent y).
   939         scrolledView subViews size == 1 ifTrue:[
       
   940             theOneComponent := scrolledView subViews first.
       
   941             theOneComponent isScrollWrapper ifTrue:[
       
   942                 "/ give it a full-relative size, and let it do
       
   943                 "/ the scrolling itself.
       
   944                 y := 1.0
       
   945             ]
       
   946         ].
       
   947         y isNil ifTrue:[
       
   948             y := scrolledView preferredExtent y
       
   949         ].
       
   950         scrolledView origin:0@0 corner:1.0 @ y.
   940         scrolledView := scrolledView.
   951         scrolledView := scrolledView.
   941         scrolledView allViewBackground:(self viewBackground).
   952         scrolledView allViewBackground:(self viewBackground).
   942     ].
   953     ].
   943 
   954 
   944     realized ifTrue:[
   955     realized ifTrue:[