--- a/SubCanvas.st Fri Aug 01 10:10:31 2008 +0200
+++ b/SubCanvas.st Fri Aug 01 10:11:25 2008 +0200
@@ -126,7 +126,7 @@
!
makeClientViewScrollable:shouldBeScrollable
- |vs|
+ |scroller|
shouldBeScrollable ~~ clientViewIsScrolled ifTrue:[
clientView isNil ifTrue:[
@@ -137,8 +137,10 @@
]
].
shouldBeScrollable ifTrue:[
- self scrolledView:(vs := ViewScroller new).
- vs scrolledView:clientView.
+ scroller := ViewScroller new.
+ scroller viewBackground:self viewBackground.
+ self scrolledView:scroller.
+ scroller scrolledView:clientView.
] ifFalse:[
self scrolledView:clientView.
].
@@ -333,7 +335,8 @@
clientView := ApplicationSubView new.
] ifFalse:[
clientView := View new.
- ]
+ ].
+ clientView viewBackground:self viewBackground.
].
useApplicationSubView ifTrue:[
clientView application:client.
@@ -366,11 +369,8 @@
].
keepClientView ifFalse:[
- (scrolledView notNil and:[clientView isComponentOf:scrolledView]) ifTrue:[
- self error:'this should not happen'
- ] ifFalse:[
- self scrolledView:clientView.
- ]
+ self assert:(scrolledView isNil or:[(clientView isComponentOf:scrolledView) not]).
+ self scrolledView:clientView.
] ifTrue:[
(clientView isComponentOf:self) ifFalse:[
self scrolledView:clientView.
@@ -460,6 +460,17 @@
"Modified: / 5.8.1999 / 13:35:26 / cg"
! !
+!SubCanvas methodsFor:'delegation'!
+
+viewBackground:aColor
+ "convenient method: forward this to the scrolledView"
+
+ super viewBackground:aColor.
+ (scrolledView notNil and:[scrolledView ~= clientView]) ifTrue:[
+ scrolledView viewBackground:aColor
+ ].
+! !
+
!SubCanvas methodsFor:'initialization'!
initialize
@@ -530,5 +541,5 @@
!SubCanvas class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.63 2008-07-24 12:43:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.64 2008-08-01 08:11:25 stefan Exp $'
! !