[Mono-winforms-list] build fix for ThemeWin32Classic.cs
Tue, 04 Jan 2005 21:15:05 +1100
I wrote the winforms month calendar code.
Using the (double) typecast is perfectly fine. I've been away for a
while, so might take a while to fix it up, since i have uncommitted
modifications to acquaint myself with.
As long as Peter is okay with it, I don't mind if you commit the patch
On Fri, 2004-12-31 at 00:00 +0900, Atsushi Eno wrote:
> Currently ThereWin32Classic.cs is a blocker for csc build. There is an
> ambiguous call to Math.Floor(decimal) or Math.Floor(double).
> Am not sure which is preferable, so please any of winforms hacker fix
> this problem. (attached is for double)
> Atsushi Eno
> plain text document attachment (ambiguous-call.diff)
> Index: ThemeWin32Classic.cs
> --- ThemeWin32Classic.cs (revision 38181)
> +++ ThemeWin32Classic.cs (working copy)
> @@ -1517,7 +1517,7 @@
> if (date < mc.SelectionEnd)
> // use rectangle instead of rectangle to go all the way to edge of rect
> - selection_rect.X = (int) Math.Floor(rectangle.X + rectangle.Width / 2);
> + selection_rect.X = (int) Math.Floor((double) (rectangle.X + rectangle.Width / 2));
> selection_rect.Width = Math.Max(rectangle.Right - selection_rect.X, 0);
> dc.FillRectangle (ResPool.GetSolidBrush (mc.TitleBackColor), selection_rect);