scrolling decorator flicker

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

scrolling decorator flicker

Zoli
Hello !!

I'm new to Dolphin and Smalltalk. Playing with the Scrolling Decorator
I noticed that the scrolled content flickers. My content is an Image
View with an image in it.
Any suggestions on how to terminate the flicker when the image
scrolls?

Cheers,
Zoli
Ontario, Canada


Reply | Threaded
Open this post in threaded view
|

Re: scrolling decorator flicker

Andy Bower
Zoli,

> I'm new to Dolphin and Smalltalk. Playing with the Scrolling Decorator
> I noticed that the scrolled content flickers. My content is an Image
> View with an image in it.
> Any suggestions on how to terminate the flicker when the image
> scrolls?

I've just done a mockup with a ShellView that includes a ScrollingDecorator
containing an ImageView and I just tried scrolling a huge bitmap and the
flicker doesn't seem too bad to me but, then again, I am using a fast
machine.  The only flicker that I see is present in the voided regions at
the edges of the scrolled area as new parts of the bitmap come into view.
This is caused by the standard default behaviour of all Windows controls to
erase to their background colour before painting their contents.

It turns out that the ImageView has its background colour sets to a light
grey by default.  This, I think, makes the effect worse than it needs to be.
Try changing the ImageView's background to white and see if that improve
things for you.

It is possible to convince the views not to erase their background at all
and, if you add the following method into the ImageView and
ScrollingDecorator classes then you will probably find that the flicker goes
away completely.

onEraseRequired: aColorEvent
   "Private -Ignore request to erase background"
   ^true

HOWEVER, I wouldn't be tempted to leave these methods in place as they will
break the general case of use for both these controls. This "fix" will only
work if one can guarantee that both controls are completely filled by their
contents and no background shows through.  Obviously, this is not normally
the case for a ScrollingDecorator since this is often used to scroll around
arbitrary groups of spaced out controls.  Similarly it is not a guaranteed
situation for the ImageView either since, depending on the viewMode, then
maybe background showing through where the image doesn't fill the entire
control.

I suppose one could implement some conditional testing around the ability to
ignore the erase background request and only do this when one was sure that
the control was completely filled by its contents.  Personally, I'm not
convinced that the additional complexity would be worthwhile.

I hope this helps.

Best Regards,

Andy Bower
Dolphin Support
http://www.object-arts.com
---
Are you trying too hard?
http://www.object-arts.com/Relax.htm
---


Reply | Threaded
Open this post in threaded view
|

Re: scrolling decorator flicker

Zoli
Thank you very much. Your support is great. I'm happy I bought Dolphin.
Best,
Zoli