--- a/Separator.st Wed Nov 28 14:16:39 2007 +0100
+++ b/Separator.st Wed Nov 28 15:07:15 2007 +0100
@@ -9,8 +9,6 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-
-
"{ Package: 'stx:libwidg2' }"
SimpleView subclass:#Separator
@@ -164,27 +162,36 @@
!Separator methodsFor:'drawing'!
-redraw
- |vCenter hCenter is3D|
+redrawX:x y:y width:w height:h
+ |vCenter hCenter is3D bgColor|
+
+ (shown and:[superView notNil]) ifFalse:[^ self].
+
+ bgColor := superView viewBackground.
- self clear.
+ bgColor isColor ifTrue:[
+ self paint:(superView viewBackground).
+ self fillRectangleX:x y:y width:w height:h.
+ ] ifFalse:[
+ self clearRectangleX:x y:y width:w height:h.
+ ].
is3D := styleSheet is3D.
self paint:shadowColor.
orientation == #vertical ifTrue:[
- hCenter := self width // 2.
- self displayLineFromX:hCenter y:0 toX:hCenter y:height-1.
- is3D ifTrue:[
- self paint:lightColor.
- self displayLineFromX:hCenter+1 y:0 toX:hCenter+1 y:height-1.
- ]
+ hCenter := self width // 2.
+ self displayLineFromX:hCenter y:0 toX:hCenter y:height-1.
+ is3D ifTrue:[
+ self paint:lightColor.
+ self displayLineFromX:hCenter+1 y:0 toX:hCenter+1 y:height-1.
+ ]
] ifFalse:[
- vCenter := self height // 2.
- self displayLineFromX:0 y:vCenter toX:width-1 y:vCenter.
- is3D ifTrue:[
- self paint:lightColor.
- self displayLineFromX:0 y:vCenter+1 toX:width-1 y:vCenter+1.
- ]
+ vCenter := self height // 2.
+ self displayLineFromX:0 y:vCenter toX:width-1 y:vCenter.
+ is3D ifTrue:[
+ self paint:lightColor.
+ self displayLineFromX:0 y:vCenter+1 toX:width-1 y:vCenter+1.
+ ]
]
!
@@ -244,5 +251,5 @@
!Separator class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/Separator.st,v 1.20 2004-02-26 12:18:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/Separator.st,v 1.21 2007-11-28 14:07:15 ca Exp $'
! !