Skip to content

Commit

Permalink
* ScrollBar.cs: Cap values when incrementing/decrementing.
Browse files Browse the repository at this point in the history
svn path=/trunk/mcs/; revision=58863
  • Loading branch information
Jackson Harper committed Mar 31, 2006
1 parent 99e972e commit 4599e1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
@@ -1,3 +1,7 @@
2006-03-31 Jackson Harper <jackson@ximian.com>

* ScrollBar.cs: Cap values when incrementing/decrementing.

2006-03-31 Mike Kestner <mkestner@novell.com>

* MenuAPI.cs: setup menu.tracker for popup/context menus.
Expand Down Expand Up @@ -59,6 +63,10 @@

* MenuItem.cs: only emit DrawItem and MeasureItem for OwnerDraw.

2006-03-29 Jackson Harper <jackson@ximian.com>

* Form.cs: Implement TODO.

2006-03-29 Peter Dennis Bartok <pbartok@novell.com>

* PrintPreviewDialog.cs: Implemented missing methods and events; still
Expand Down Expand Up @@ -86,6 +94,7 @@
- Making sure the active control is selected when the control is created
* CurrencyManager.cs: Removed obsolete TODO

>>>>>>> .r58862
2006-03-29 Mike Kestner <mkestner@novell.com>

* *.cs: fix remaining corcompare issues for 1.1 API with the exception
Expand Down
Expand Up @@ -570,7 +570,7 @@ private void CalcThumbArea ()
private void LargeIncrement ()
{
ScrollEventArgs event_args;
int pos = position + large_change;
int pos = Math.Min (Maximum, position + large_change);

event_args = new ScrollEventArgs (ScrollEventType.LargeIncrement, pos);
OnScroll (event_args);
Expand All @@ -584,7 +584,7 @@ private void LargeIncrement ()
private void LargeDecrement ()
{
ScrollEventArgs event_args;
int pos = position - large_change;
int pos = Math.Max (Minimum, position - large_change);

event_args = new ScrollEventArgs (ScrollEventType.LargeDecrement, pos);
OnScroll (event_args);
Expand Down Expand Up @@ -1029,7 +1029,7 @@ private void SetHomePosition ()
private void SmallIncrement ()
{
ScrollEventArgs event_args;
int pos = position + small_change;
int pos = Math.Min (Maximum, position + small_change);

event_args = new ScrollEventArgs (ScrollEventType.SmallIncrement, pos);
OnScroll (event_args);
Expand All @@ -1043,8 +1043,8 @@ private void SmallIncrement ()
private void SmallDecrement ()
{
ScrollEventArgs event_args;
int pos = position - small_change;
int pos = Math.Max (Minimum, position - small_change);

event_args = new ScrollEventArgs (ScrollEventType.SmallDecrement, pos);
OnScroll (event_args);
Value = event_args.NewValue;
Expand Down

0 comments on commit 4599e1e

Please sign in to comment.