From 7901c19ac01323d4caa3744aeb45d24156e89dc7 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Mon, 15 Feb 2016 18:41:40 +0100 Subject: remove Hoverable --- src/GraphicObjects/GraphicObject.cs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'src/GraphicObjects/GraphicObject.cs') diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index d7585d58..5cda9191 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -69,7 +69,6 @@ namespace Crow double _cornerRadius = 0; int _margin = 0; bool _focusable = false; - bool hoverable = true; bool _hasFocus = false; bool _isActive = false; bool _mouseRepeat; @@ -273,19 +272,6 @@ namespace Crow Bounds.Width = Bounds.Height = -1; } } - /// - /// used to handle mouse hover in children instead of the whole container - /// - [XmlAttributeAttribute()][DefaultValue(true)] - public virtual bool Hoverable { - get { return hoverable; } - set { - if (hoverable == value) - return; - hoverable = value; - NotifyValueChanged ("Hoverable", hoverable); - } - } [XmlAttributeAttribute()][DefaultValue(false)] public virtual bool Focusable { get { return _focusable; } @@ -929,8 +915,11 @@ namespace Crow return false; if (ScreenCoordinates (Slot).ContainsOrIsEqual (m)) { Scroller scr = Parent as Scroller; - if (scr == null) - return Hoverable; + if (scr == null) { + if (Parent is GraphicObject) + return (Parent as GraphicObject).MouseIsIn (m); + else return true; + } return scr.MouseIsIn (scr.savedMousePos); } return false; -- cgit v1.3.1-4-g156e