diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-16 14:35:14 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-16 14:44:47 +0100 |
| commit | 61d1d07d37a5cc9d6ae1c4fcc333ec8ae644aca3 (patch) | |
| tree | f8d1b14df78c24cd989ac02581bd7028fb1c92f8 /src | |
| parent | 3249b270c5bd2f33aaa878e17bcc0f570cc8ea56 (diff) | |
improve layouting debug output
Diffstat (limited to 'src')
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 9 | ||||
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 4 | ||||
| -rw-r--r-- | src/LayoutingQueueItem.cs | 12 |
3 files changed, 15 insertions, 10 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index 7f4dbea8..bbbc52ec 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -83,9 +83,6 @@ namespace Crow } public virtual void ComputeChildrenPositions() { - #if DEBUG_LAYOUTING - Debug.WriteLine("ComputeChildrenPosition: " + this.ToString()); - #endif int d = 0; if (Orientation == Orientation.Horizontal) { foreach (GraphicObject c in Children) { @@ -149,6 +146,9 @@ namespace Crow if (stretchedGO.LastSlots.Width != tmpWidth) { stretchedGO.Slot.Width = tmpWidth; stretchedGO.bmp = null; + #if DEBUG_LAYOUTING + Debug.WriteLine ("\tAdjusting Width of " + stretchedGO.ToString()); + #endif stretchedGO.OnLayoutChanges (LayoutingType.Width); stretchedGO.LastSlots.Width = stretchedGO.Slot.Width; } @@ -184,6 +184,9 @@ namespace Crow if (stretchedGO.LastSlots.Height != tmpHeight) { stretchedGO.Slot.Height = tmpHeight; stretchedGO.bmp = null; + #if DEBUG_LAYOUTING + Debug.WriteLine ("\tAdjusting Height of " + stretchedGO.ToString()); + #endif stretchedGO.OnLayoutChanges (LayoutingType.Height); stretchedGO.LastSlots.Height = stretchedGO.Slot.Height; } diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index b184d2d9..f10f2244 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -657,7 +657,7 @@ namespace Crow return; #if DEBUG_LAYOUTING - Debug.WriteLine ("RegisterForLayouting => {1}->{0}", layoutType, this.ToString()); + Debug.WriteLine ("REGLayout => {1}->{0}", layoutType, this.ToString()); #endif //enqueue LQI LayoutingTypes separately @@ -677,7 +677,7 @@ namespace Crow public virtual void OnLayoutChanges(LayoutingType layoutType) { #if DEBUG_LAYOUTING - Debug.WriteLine ("Layout change: " + this.ToString () + ":" + LastSlots.ToString() + "=>" + Slot.ToString ()); + Debug.WriteLine ("\t " + LastSlots.ToString() + "\n\t => " + Slot.ToString ()); #endif switch (layoutType) { diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index 50dbe391..ef56d6c6 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -56,18 +56,20 @@ namespace Crow Debug.WriteLine ("ERROR: processLayouting, no parent for: " + this.ToString ()); return; } + #if DEBUG_LAYOUTING + Debug.WriteLine ("Layouting => " + this.ToString ()); + #endif if (!GraphicObject.UpdateLayout (LayoutType)) { #if DEBUG_LAYOUTING - Debug.WriteLine ("Requeuing => " + this.ToString ()); + Debug.WriteLine ("\tRequeuing => " + this.ToString ()); #endif GraphicObject.LayoutingTries ++; - if (GraphicObject.LayoutingTries < Interface.MaxLayoutingTries) + if (GraphicObject.LayoutingTries < Interface.MaxLayoutingTries) { + GraphicObject.RegisteredLayoutings |= LayoutType; Interface.LayoutingQueue.Enqueue (this); + } } else { GraphicObject.LayoutingTries = 0; - #if DEBUG_LAYOUTING - Debug.WriteLine ("Layouting => " + this.ToString ()); - #endif } } |