SimpleView.st
changeset 6716 e9b2ebb0e8cf
parent 6709 01a7a3cb5394
child 6719 6805c57dfff3
--- a/SimpleView.st	Mon Jan 05 21:35:12 2015 +0100
+++ b/SimpleView.st	Mon Jan 05 21:35:37 2015 +0100
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 DisplaySurface subclass:#SimpleView
 	instanceVariableNames:'superView subViews components styleSheet resources border unused
 		viewShape top left flagBits relativeOrigin relativeExtent
@@ -1888,8 +1890,17 @@
 border:aBorder
     "set my border"
 
+    |prevMargin m|
+
+    prevMargin := margin.
     border := aBorder.
     self computeMargin.
+
+    m := prevMargin max:margin.
+    self invalidate:(0@0 corner:width@m) repairNow:false.  "/ top margin
+    self invalidate:(width-m@m corner:width@height) repairNow:false.  "/ right margin
+    self invalidate:(0@(height-m) corner:width@height) repairNow:false.  "/ bottom margin
+    self invalidate:(0@m corner:m@height-m) repairNow:false.  "/ left margin
 !
 
 borderColor
@@ -11299,11 +11310,11 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.774 2014-12-21 23:31:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.775 2015-01-05 20:35:37 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.774 2014-12-21 23:31:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.775 2015-01-05 20:35:37 cg Exp $'
 !
 
 version_SVN