#TUNING by cg
class: Separator
changed: #redrawX:y:width:height:
draw by sending messages to gc instead of self.
(new GC structure)
--- a/Separator.st Tue Jan 24 23:22:06 2017 +0100
+++ b/Separator.st Tue Jan 24 23:22:31 2017 +0100
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libwidg2' }"
+"{ NameSpace: Smalltalk }"
+
SimpleView subclass:#Separator
instanceVariableNames:'orientation'
classVariableNames:''
@@ -170,27 +172,27 @@
bgColor := superView viewBackground.
bgColor isColor ifTrue:[
- self paint:(superView viewBackground).
- self fillRectangleX:x y:y width:w height:h.
+ gc paint:(superView viewBackground).
+ gc fillRectangleX:x y:y width:w height:h.
] ifFalse:[
- self clearRectangleX:x y:y width:w height:h.
+ gc clearRectangleX:x y:y width:w height:h.
].
is3D := styleSheet is3D.
- self paint:shadowColor.
+ gc paint:shadowColor.
orientation == #vertical ifTrue:[
hCenter := self width // 2.
- self displayLineFromX:hCenter y:0 toX:hCenter y:height-1.
+ gc 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.
+ gc paint:lightColor.
+ gc 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.
+ gc 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.
+ gc paint:lightColor.
+ gc displayLineFromX:0 y:vCenter+1 toX:width-1 y:vCenter+1.
]
]
!
@@ -259,9 +261,10 @@
!Separator class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/Separator.st,v 1.24 2009-10-24 14:00:07 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg2/Separator.st,v 1.24 2009-10-24 14:00:07 cg Exp $'
+ ^ '$Header$'
! !
+