Author: jpobst
Date: 2007-09-11 12:31:24 -0400 (Tue, 11 Sep 2007)
New Revision: 85645
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:
2007-09-11 Jonathan Pobst <[EMAIL PROTECTED]>
* ThemeWin32Classic.cs: Math is hard! Fix some math so that the
TrackBar
handle moves to the closest tick when it is being dragged.
[Fixes bug #82751]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-09-11 16:03:02 UTC (rev 85644)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-09-11 16:31:24 UTC (rev 85645)
@@ -1,5 +1,11 @@
2007-09-11 Jonathan Pobst <[EMAIL PROTECTED]>
+ * ThemeWin32Classic.cs: Math is hard! Fix some math so that the
TrackBar
+ handle moves to the closest tick when it is being dragged.
+ [Fixes bug #82751]
+
+2007-09-11 Jonathan Pobst <[EMAIL PROTECTED]>
+
* ToolStripManager.cs: When we have added MDI buttons onto a MenuStrip,
we
can't let them count as real items when calculating where to merge in
the
user's items. [Fixed bug #82786]
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2007-09-11 16:03:02 UTC (rev 85644)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
2007-09-11 16:31:24 UTC (rev 85645)
@@ -5274,7 +5274,7 @@
/* Convert thumb position from mouse position to value*/
if (tb.Orientation == Orientation.Vertical) {
- value_pos = (int)((thumb_area.Bottom - y
-(float)pixels_betweenticks / 2) / (float)pixels_betweenticks);
+ value_pos = (int)Math.Round
(((thumb_area.Bottom - y - (float)thumb_pos.Height / 2) /
(float)pixels_betweenticks), 0);
if (value_pos + tb.Minimum > tb.Maximum)
value_pos = tb.Maximum - tb.Minimum;
@@ -5283,7 +5283,7 @@
result = value_pos + tb.Minimum;
} else {
- value_pos = (int) ((x - channel_startpoint.X -
(float) pixels_betweenticks / 2) / (float) pixels_betweenticks);
+ value_pos = (int)Math.Round (((x -
channel_startpoint.X - (float)thumb_pos.Width / 2) / (float)
pixels_betweenticks), 0);
if (value_pos + tb.Minimum > tb.Maximum)
value_pos = tb.Maximum - tb.Minimum;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches