# HG changeset patch # User Claus Gittinger # Date 1242641536 -7200 # Node ID b717cb2e0cb8f8d587c40a101886e50ab1e5e6f1 # Parent 460098ee1f39ba65568a92ef0bc186e50a0b73e5 nicer handles: care for handles-on-dark (white frame) diff -r 460098ee1f39 -r b717cb2e0cb8 UIGalleryView.st --- a/UIGalleryView.st Mon May 18 12:11:38 2009 +0200 +++ b/UIGalleryView.st Mon May 18 12:12:16 2009 +0200 @@ -620,18 +620,21 @@ !UIGalleryView::Canvas methodsFor:'selection'! handlesOf:aComponent do:aOneArgBlock - "evaluate the block on each handle; the argument to the block - is a rectangle - " + "evaluate the block on each handle; the argument to the block is a rectangle" + + |ext| + + ext := 6@6. + aComponent notNil ifTrue:[ - aOneArgBlock value:(aComponent origin - (2@2) extent:6@6). - aOneArgBlock value:(aComponent corner - (1@1) extent:6@6). - aOneArgBlock value:(aComponent topRight - (1@2) extent:6@6). - aOneArgBlock value:(aComponent bottomLeft - (2@1) extent:6@6). - aOneArgBlock value:(aComponent leftCenter rounded - (2@0) extent:6@6). - aOneArgBlock value:(aComponent rightCenter rounded - (1@0) extent:6@6). - aOneArgBlock value:(aComponent topCenter rounded - (0@2) extent:6@6). - aOneArgBlock value:(aComponent bottomCenter rounded - (0@1) extent:6@6). + aOneArgBlock value:(aComponent origin - (2@2) extent:ext). + aOneArgBlock value:(aComponent corner - (1@1) extent:ext). + aOneArgBlock value:(aComponent topRight - (1@2) extent:ext). + aOneArgBlock value:(aComponent bottomLeft - (2@1) extent:ext). + aOneArgBlock value:(aComponent leftCenter rounded - (2@0) extent:ext). + aOneArgBlock value:(aComponent rightCenter rounded - (1@0) extent:ext). + aOneArgBlock value:(aComponent topCenter rounded - (0@2) extent:ext). + aOneArgBlock value:(aComponent bottomCenter rounded - (0@1) extent:ext). ] ! @@ -641,9 +644,12 @@ (shown and:[selection notNil and:[hiddenCounter == 0]]) ifTrue:[ self clippedByChildren:false. - self paint:Color black. self handlesOf:selection do:[:aRectangle| - self fillRectangle:aRectangle + self paint:Color black. + self fillRectangle:aRectangle. + + self paint:Color white. + self displayRectangle:(aRectangle insetBy:-1). ]. self clippedByChildren:true. ].