[Mono-winforms-list] Patch (and possible bug) Fix Checkbox Check rendering

jba-mono@optusnet.com.au jba-mono@optusnet.com.au
Thu, 14 Oct 2004 09:07:41 +1000


Hey guys, 

Firstly, about the hatch brush,

It's not a regression, I removed it on purpose, because I couldn't seem to reproduce 
the hatch effect on windows when either a button style check or radio is pushed or 
when a normal button is pushed.

Since I couldn't see the effect, I assumed that the hatch brush was trying to simply 
change the shade of the backColor, some thing I thought I would get round to when I 
looked at the ButtonBase (just after I do my next round of radiobutton fixes).

So basically, I couldn't see the hatch brush effect being applied in windows classic 
and I removed it. It's possible that I may have missed something but I'm not sure what 
it's meant to be. If someone can provide a test case or screen shot of the effect I 
missed then I'll go back in an put the hatch brush back.

As for my suspicions about Capture, well I know I should have checked the code to 
see if either was happening, but it was late and I was tired ;) I just wanted to note 
somewhere what I saw and what I thought it was so I could get back to it later. As it 
turns out, it's probably something that is beyond my abilities (for now), so it's best left 
to you.

JBA



> Peter Dennis Bartok <peter@novonyx.com> wrote:
> 
> John,
> 
> Thanks for the patch. I believe we have a regression, though, but it 
> wasn't 
> with this patch, but with one of your earlier ones. When setting a 
> checkbox 
> to 'button' display, the hatchbrush pattern is no longer drawn when the 
> 
> button is checked (pushed).
> 
> >Now for the possible bug that this patch exposes:
> >this is how to reproduce it first.
> 
> I can reproduce the bug on Linux, but not on Windows.
> 
> >I suspect it is one of the following (in order of probability)
> >1) The Capture property setter is not causing the control to re-render
> >itself when it's being changed.
> >2 or the Capture property is not being set to false when the mouse
> >button is released outside the control.
> 
> Nope, if you check the code you'll see that both is happening. If not, 
> many 
> bad things would happen. Also, it does work properly on Windows. I'll 
> debug 
> and let you know what I find.
> 
> Cheers,
>  Peter