[Mono-dev] Patches for mono-winforms

Stifu stifu at free.fr
Sat Jun 23 23:31:16 UTC 2012


Steven, what do you think we should do?
This seems to fix the regression:

		protected virtual void OnRenderItemBackground
(ToolStripItemRenderEventArgs e)
		{
		    if (e.Item.Parent.BackColor != Control.DefaultBackColor) {
    			Rectangle item_bounds = new Rectangle (0, 0, e.Item.Width,
e.Item.Height);
    			e.Graphics.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush
(e.Item.BackColor), item_bounds);
		    }

			if (e.Item.BackgroundImage != null) {
    			Rectangle item_bounds = new Rectangle (0, 0, e.Item.Width,
e.Item.Height);
				DrawBackground (e.Graphics, item_bounds, e.Item.BackgroundImage,
e.Item.BackgroundImageLayout);
			}
				
			ToolStripItemRenderEventHandler eh =
(ToolStripItemRenderEventHandler)Events [RenderItemBackgroundEvent];
			if (eh != null)
				eh (this, e);
		}

Do you have a better idea?


Stifu wrote
> 
> I just noticed patch 6
> (https://github.com/mono/mono/commit/3d04a14a278d6160e33c16b52b86d68fe45d80b1)
> caused a regression.
> 
> See the attached screenshot (top: before patch, bottom: after patch).
>  http://mono.1490590.n4.nabble.com/file/n4650149/toolstripitems.png
> toolstripitems.png 
> 
> The application this screenshot is from:
> http://epicedit.stifu.fr/download/EpicEdit_2.5.zip
> 
> By the way, I just reported bug 5834
> (https://bugzilla.xamarin.com/show_bug.cgi?id=5834), which may be related,
> except that one isn't a regression. Maybe we can kill two birds with one
> stone.
> 
> 
> Stifu wrote
>> 
>> PS: there's this one you can close, too:
>> https://bugzilla.xamarin.com/show_bug.cgi?id=5420
>> 
>> 
>> Steven Boswell II wrote
>>> 
>>> Enclosed is a bug fix for another issue I ran into with Mono's ComboBox,
>>> where its behavior deviated from what .NET does.  You can apply the
>>> unit-test patch, watch it fail, then apply the patch, and watch the unit
>>> test succeed.  You can also run the enclosed project to see it succeed
>>> under .NET, fail with unpatched Mono, and succeed with patched Mono.
>>> 
>>> There doesn't seem to be any existing bug reports on this issue.
>>> 
>>> Hopefully this patch is a slam dunk, and Stifu doesn't have to waste his
>>> time pointing out my screwups. I really hate wasting his time like that.
>>> ;-)
>>> 
>>> Steven Boswell
>>> 
>>> P.S. https://bugzilla.xamarin.com/show_bug.cgi?id=5419 and https://bugzilla.xamarin.com/show_bug.cgi?id=5595 can
>>> be closed, since the patches were pushed.
>>> 
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at .ximian
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>> 
>> 
> 

--
View this message in context: http://mono.1490590.n4.nabble.com/Patches-for-mono-winforms-tp4649620p4650150.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list