Tip (bug?): Splitter color

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Tip (bug?): Splitter color

Louis Sumberg
The color of a Splitter is currently hardcoded as Color face3d.  If you look
at Splitter>>#onPaintRequired: you'll see it calls self defaultColor which
in turn simply returns Color face3d.  I find in some applications that I'd
like a more prominent splitter and since Splitter does have a background
aspect, it seems it should be used when supplied.  A quick fix is:

In Splitter:
defaultColor
   "Private - Answers the default color to be used for the receiver. Use
   the 3D face color from the system colors if backcolor not specified."

   ^self backcolor notNil ifTrue: [self backcolor] ifFalse: [Color face3d]