I am seeing annoying flickering when resizing a status bar item using
a custom view.
I tried using
* [statusItem setLength:XX.X] and
* [customView setFrame:newFrame]
Both methods produce flickering. I investigated further to see where
exactly is the flicker happening.
The problem is probably best illustrated with the debugger using the
sample code below:
There are 3 breakpoint
2 before and after "setFrame" in the action "add" and
1 more at the start of drawRect in the custom view
1. When the "add" action is invoked (look at the sample code below),
just before setFrame is called this is a screen capture of the status
item (it is good): http://grkov.com/tmp/pic1.png
2. Step Over, and while within setFrame, the breakpoint in SBView
drawRect is reached. This is a screen capture of that (not good, we
see the problem): http://grkov.com/tmp/pic2.png
Here we see why the flicker occurs. The custom view is shifted 10
pixels to the left and the new 10 pixels show up as white.