aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-07 15:28:54 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-07 15:28:54 +0100
commit6c152b554e65b5cb5f4cf6521d65d94b8fdc28cc (patch)
treeddf22183b061676c1ffb881bddf350ccd17e7deb
parent6f303fb67fcc7843ed564c676d12e86b034cfe0a (diff)
inflate bounds of splitter for PointIsIn check
-rw-r--r--src/GraphicObjects/Splitter.cs16
1 files changed, 15 insertions, 1 deletions
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
}
}