diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-29 23:26:46 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-29 23:26:46 +0100 |
| commit | dc603ff31253879bb8effb6d529f266ff78e9f3e (patch) | |
| tree | e48f38ac22040da95371f661be482389b21e473e /src/GraphicObjects/GraphicObject.cs | |
| parent | 1a4fe8bd37ed4a3e3324a134df4f90c14b315918 (diff) | |
| parent | 2ec4eeed1d0353c455719aa612a12646ae2d176e (diff) | |
Merge improvements and debug from 'CrowIDE' branch
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index e0e6affc..574870f8 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -270,7 +270,6 @@ namespace Crow set { if (horizontalAlignment == value) return; - horizontalAlignment = value; NotifyValueChanged("HorizontalAlignment", horizontalAlignment); RegisterForLayouting (LayoutingType.X); @@ -282,7 +281,6 @@ namespace Crow set { if (left == value) return; - left = value; NotifyValueChanged ("Left", left); this.RegisterForLayouting (LayoutingType.X); @@ -294,7 +292,6 @@ namespace Crow set { if (top == value) return; - top = value; NotifyValueChanged ("Top", top); this.RegisterForLayouting (LayoutingType.Y); @@ -509,10 +506,6 @@ namespace Crow isVisible = value; - //ensure main win doesn't keep hidden childrens ref - if (!isVisible && this.Contains (CurrentInterface.HoverWidget)) - CurrentInterface.HoverWidget = null; - if (isVisible) RegisterForLayouting (LayoutingType.Sizing); else { @@ -524,6 +517,8 @@ namespace Crow LastSlots.Width = LastSlots.Height = 0; } + //trigger a mouse to handle possible hover changes + CurrentInterface.ProcessMouseMove (CurrentInterface.Mouse.X, CurrentInterface.Mouse.Y); NotifyValueChanged ("Visible", isVisible); } @@ -893,6 +888,7 @@ namespace Crow #if DEBUG_LAYOUTING CurrentInterface.currentLQI.Slot = LastSlots; CurrentInterface.currentLQI.NewSlot = Slot; + Debug.WriteLine ("\t\t{0} => {1}",LastSlots,Slot); #endif switch (layoutType) { @@ -1193,7 +1189,7 @@ namespace Crow if (p != null) p.onMouseMove(sender,e); - MouseMove.Raise (sender, e); + MouseMove.Raise (this, e); } public virtual void onMouseDown(object sender, MouseButtonEventArgs e){ if (CurrentInterface.eligibleForDoubleClick == this && CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick) @@ -1202,8 +1198,8 @@ namespace Crow currentInterface.clickTimer.Restart(); CurrentInterface.eligibleForDoubleClick = null; - if (CurrentInterface.activeWidget == null) - CurrentInterface.activeWidget = this; + if (CurrentInterface.ActiveWidget == null) + CurrentInterface.ActiveWidget = this; if (this.Focusable && !Interface.FocusOnHover) { BubblingMouseButtonEventArg be = e as BubblingMouseButtonEventArg; if (be.Focused == null) { |