From: Jean-Philippe Bruyère Date: Wed, 7 Mar 2018 14:28:54 +0000 (+0100) Subject: inflate bounds of splitter for PointIsIn check X-Git-Tag: v0.9.5-beta~153^2~18 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=6c152b554e65b5cb5f4cf6521d65d94b8fdc28cc;p=jp%2Fcrow.git inflate bounds of splitter for PointIsIn check --- diff --git a/src/GraphicObjects/Splitter.cs b/src/GraphicObjects/Splitter.cs index 59a70d25..84e1ade0 100644 --- a/src/GraphicObjects/Splitter.cs +++ b/src/GraphicObjects/Splitter.cs @@ -43,7 +43,7 @@ namespace Crow int thickness; - [XmlAttributeAttribute][DefaultValue(3)] + [XmlAttributeAttribute][DefaultValue(1)] public virtual int Thickness { get { return thickness; } set { @@ -217,6 +217,20 @@ namespace Crow } return base.UpdateLayout (layoutType); } + public override bool PointIsIn (ref Point m) + { + if (!(Visible & IsEnabled)||IsDragged) + return false; + if (!Parent.PointIsIn(ref m)) + return false; + m -= (Parent.getSlot().Position + Parent.ClientRectangle.Position) ; + Rectangle r = Slot; + if (Width == Measure.Stretched) + r.Inflate (0, 5); + else + r.Inflate (5, 0); + return r.ContainsOrIsEqual (m); + } #endregion } }