* TabControl.cs: Account for the drawing of tabs borders when
authorJackson Harper <jackson@novell.com>
Wed, 23 Mar 2005 21:19:25 +0000 (21:19 -0000)
committerJackson Harper <jackson@novell.com>
Wed, 23 Mar 2005 21:19:25 +0000 (21:19 -0000)
invalidating. If the slider was clicked dont do click detection on
the tabs.

svn path=/trunk/mcs/; revision=42174

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs

index bf577dedd1204a4904931d2bddbd4e086f88cc97..9d9fe5f3447927bbcbbb51e9f990ae0cc6254769 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-23  Jackson Harper  <jackson@ximian.com>
+
+       * TabControl.cs: Account for the drawing of tabs borders when
+       invalidating. If the slider was clicked dont do click detection on
+       the tabs.
+
 2005-03-23  Jackson Harper  <jackson@ximian.com>
 
        * TabControl.cs: Fix typo, emilinates an unneeded expose event.
index 471358ef9fda4be6be1b8b0336ecc959b5ae207d..93c602ffc65579c03e1569f0ac8251a5e68bfea5 100644 (file)
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-// Copyright (c) 2004 Novell, Inc.
+// Copyright (c) 2004-2005 Novell, Inc.
 //
 // Authors:
 //     Jackson Harper (jackson@ximian.com)
@@ -240,8 +240,12 @@ namespace System.Windows.Forms {
                                        Refresh ();
                                } else {
                                        SizeTabs ();
+                                       // The lines are drawn on the edges of the tabs so the invalid area should
+                                       // needs to include the extra pixels of line width.
+                                       if (appearance == TabAppearance.Normal)
+                                               invalid.Inflate (4, 4);
                                        Invalidate (invalid);
-                                }
+                               }
                        }
                }
 
@@ -453,6 +457,7 @@ namespace System.Windows.Forms {
                                        } else {
                                                Invalidate (right);
                                        }
+                                       return;
                                } else if (left.Contains (e.X, e.Y)) {
                                        left_slider_state = ButtonState.Pushed;
                                        if (CanScrollLeft) {
@@ -462,6 +467,7 @@ namespace System.Windows.Forms {
                                        } else {
                                                Invalidate (left);
                                        }
+                                       return;
                                }
                        }