diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-17 00:53:59 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-17 00:53:59 +0100 |
| commit | a8a5562df0358b314197f3685fc7622ecfd307d0 (patch) | |
| tree | 02cdd70b6b0f999dd2a2eab7bf8018da03ffdd9f /src/GraphicObjects/PrivateContainer.cs | |
| parent | 61d1d07d37a5cc9d6ae1c4fcc333ec8ae644aca3 (diff) | |
splitted measure with fault checking, changing default template sizing to 0, lots of bugs.
Diffstat (limited to 'src/GraphicObjects/PrivateContainer.cs')
| -rw-r--r-- | src/GraphicObjects/PrivateContainer.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs index f3c9f43d..640e8d0b 100644 --- a/src/GraphicObjects/PrivateContainer.cs +++ b/src/GraphicObjects/PrivateContainer.cs @@ -91,9 +91,16 @@ namespace Crow return child == goToFind ? true : child == null ? false : child.Contains(goToFind); } - protected override Size measureRawSize () - { - return child == null ? Bounds.Size : child.Slot.Size + 2 * Margin; + protected override int measureRawSize (LayoutingType lt) + { + if (child == null) + return base.measureRawSize (lt); + if (lt == LayoutingType.Width) + return child.RegisteredLayoutings.HasFlag(LayoutingType.Width) ? + -1 : child.Slot.Size.Width + 2 * Margin; + else + return child.RegisteredLayoutings.HasFlag(LayoutingType.Height) ? + -1 : child.Slot.Size.Height + 2 * Margin; } public override bool UpdateLayout (LayoutingType layoutType) { |