Toggle.st
changeset 6060 fcd81f4fe76c
parent 5954 a39c4c036662
equal deleted inserted replaced
6059:862a2c65691b 6060:fcd81f4fe76c
   607         controller pressed ifTrue:[
   607         controller pressed ifTrue:[
   608             clr := lampColor.
   608             clr := lampColor.
   609         ] ifFalse:[
   609         ] ifFalse:[
   610             clr := bgColor.
   610             clr := bgColor.
   611         ].
   611         ].
   612         self paint:clr.
   612         gc paint:clr.
   613         l2 := LampInset*2.
   613         l2 := LampInset*2.
   614         self 
   614         gc
   615             fillRectangleX:x+LampInset y:y+LampInset 
   615             fillRectangleX:x+LampInset y:y+LampInset 
   616             width:(self lampImageWidth) - l2 
   616             width:(self lampImageWidth) - l2 
   617             height:(self lampImageHeight) - l2
   617             height:(self lampImageHeight) - l2
   618     ]
   618     ]
   619 
   619 
   624 drawWith:fg and:bg
   624 drawWith:fg and:bg
   625     "redraw myself with fg/bg. Use super to draw the label, 
   625     "redraw myself with fg/bg. Use super to draw the label, 
   626      drawing of the lamp is done here."
   626      drawing of the lamp is done here."
   627 
   627 
   628     shown ifFalse:[^ self].
   628     shown ifFalse:[^ self].
       
   629     
   629     super drawWith:fg and:bg.   "this draws the text"
   630     super drawWith:fg and:bg.   "this draws the text"
   630 
   631 
   631     self drawToggleImage.
   632     self drawToggleImage.
   632 
   633 
   633     "Modified: / 3.11.1997 / 13:19:32 / cg"
   634     "Modified: / 3.11.1997 / 13:19:32 / cg"