diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-31 23:29:05 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-31 23:29:05 +0100 |
| commit | 48c45e200584ac18efd076e2246c8a6d17f16beb (patch) | |
| tree | a1e048638263fbb138043f902e971a254e0cf98b /src/GraphicObjects/Wrapper.cs | |
| parent | 280aa1ec9ce25ad0db63719e329bd349e5edf11b (diff) | |
debug wrapper layouting, finalyse FileDialog wrapper usage
Diffstat (limited to 'src/GraphicObjects/Wrapper.cs')
| -rw-r--r-- | src/GraphicObjects/Wrapper.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GraphicObjects/Wrapper.cs b/src/GraphicObjects/Wrapper.cs index fcf88583..b33b62b7 100644 --- a/src/GraphicObjects/Wrapper.cs +++ b/src/GraphicObjects/Wrapper.cs @@ -82,19 +82,21 @@ namespace Crow { //children can't stretch in a wrapper GraphicObject go = sender as GraphicObject; - //Debug.WriteLine ("child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString()); + //System.Diagnostics.Debug.WriteLine ("wrapper child layout change: " + go.LastSlots.ToString() + " => " + go.Slot.ToString()); switch (arg.LayoutType) { case LayoutingType.Width: - if (Orientation == Orientation.Horizontal && go.Width.Units == Unit.Percent) { + if (Orientation == Orientation.Horizontal && go.Width.Units == Unit.Percent){ go.Width = Measure.Fit; return; } + this.RegisterForLayouting (LayoutingType.Width); break; case LayoutingType.Height: if (Orientation == Orientation.Vertical && go.Height.Units == Unit.Percent) { go.Height = Measure.Fit; return; } + this.RegisterForLayouting (LayoutingType.Height); break; default: return; @@ -107,7 +109,7 @@ namespace Crow protected override int measureRawSize (LayoutingType lt) { int tmp = 0; - //Wrapper can't fit in the direction of the wrapper + //Wrapper can't fit in the opposite direction of the wrapper, this func is called only if Fit if (lt == LayoutingType.Width) { if (Orientation == Orientation.Vertical) { Width = Measure.Stretched; @@ -194,7 +196,6 @@ namespace Crow CurrentInterface.currentLQI.Slot = LastSlots; CurrentInterface.currentLQI.Slot = Slot; #endif - switch (layoutType) { case LayoutingType.Width: foreach (GraphicObject c in Children) { @@ -218,7 +219,7 @@ namespace Crow return; } RegisterForLayouting (LayoutingType.ArrangeChildren); - //LayoutChanged.Raise (this, new LayoutingEventArgs (layoutType)); + raiseLayoutChanged (new LayoutingEventArgs (layoutType)); } #endregion } |