[PATCH] setup: Always draw chooser icons using system colors

Igor Peshansky pechtcha@cs.nyu.edu
Tue May 23 15:51:00 GMT 2006

On Tue, 23 May 2006, Brian Dessent wrote:

> Igor Peshansky wrote:
> > As promised in <http://cygwin.com/ml/cygwin/2006-05/msg00612.html>, here's
> > a patch that makes setup always draw the chooser icons using the system
> > foreground and background colors (just like it does for text).  I've also
> > taken the opportunity to do a slight bit of code clean-up.  There's still
> > a little glitch left -- when doing a lot of fast scrolling back and forth,
> > the icons sometimes switch from the system foreground color to the
> > inverted system background color.  I think I know why this is happening
> > (i.e., the FillRgn() gets ignored for some reason), but this needs further
> > debugging.  As this is a corner case, I wouldn't worry too much about it.
> > As always, the ChangeLog is below -- opinions welcome.
> Thanks for taking a look at this.  I like that it abstracts all the
> blitting to one place, although it seems wasteful to me to have to
> create and destroy dc_tmp like that every time.  However, whatever
> performance hit this creates is probably better than the blatant
> incorrectness that is there now, so I guess this is progress.  I'm also
> a little hesitant about this glitch you mention, but it sounds like
> you're on top of that too so I say go ahead and check this in and we can
> smooth out the rough edges later.

Right.  I was a bit concerned about the performance hit, but I haven't
noticed any slowdown in drawing the chooser.  Also, I couldn't factor out
(and cache) the creation of those resources, and figured a timely patch
was better than wasting time exploring it.  We can always do this in a
later refactoring.

As for the glitch, I've only noticed this after very intensive fast
scrolling back-and-forth, using the scroll buttons instead of the scroll
bars...  It's annoying, but I wouldn't worry about it.  What I do worry
about is that my patch doesn't check the return values of any functions.
I need to fix that before I check it in.  Maybe tonight.
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

More information about the Cygwin-apps mailing list