aboutsummaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GraphicObjects/GraphicObject.cs21
-rw-r--r--src/GraphicObjects/Group.cs10
-rw-r--r--src/GraphicObjects/PrivateContainer.cs6
3 files changed, 5 insertions, 32 deletions
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;
}
}
- /// <summary>
- /// used to handle mouse hover in children instead of the whole container
- /// </summary>
- [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;
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs
index 68c92e2a..12d8c705 100644
--- a/src/GraphicObjects/Group.cs
+++ b/src/GraphicObjects/Group.cs
@@ -268,16 +268,6 @@ namespace Crow
#region Mouse handling
- public override bool MouseIsIn (Point m)
- {
- if (Hoverable)
- return base.MouseIsIn (m);
- for (int i = Children.Count - 1; i >= 0; i--) {
- if (Children[i].MouseIsIn(m))
- return true;
- }
- return false;
- }
public override void checkHoverWidget (MouseMoveEventArgs e)
{
if (HostContainer.hoverWidget != this) {
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index 7bc62cb8..f3c9f43d 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -225,12 +225,6 @@ namespace Crow
#endregion
#region Mouse handling
- public override bool MouseIsIn (Point m)
- {
- if (Hoverable || child == null)
- return base.MouseIsIn (m);
- return child.MouseIsIn (m);
- }
public override void checkHoverWidget (MouseMoveEventArgs e)
{
base.checkHoverWidget (e);