nicer handles: care for handles-on-dark (white frame)
authorClaus Gittinger <cg@exept.de>
Mon, 18 May 2009 12:12:16 +0200
changeset 2534 b717cb2e0cb8
parent 2533 460098ee1f39
child 2535 961e4b080571
nicer handles: care for handles-on-dark (white frame)
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.
     ].