diff options
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 11 | ||||
| -rw-r--r-- | src/GraphicObjects/ListBox.cs | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 549f9a91..6175b2d8 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -398,7 +398,8 @@ namespace Crow if (Parent is GenericStack) (Parent as GraphicObject).RegisterForLayouting (LayoutingType.ArrangeChildren); - RegisterForLayouting (LayoutingType.Sizing); + if (_isVisible) + RegisterForLayouting (LayoutingType.Sizing); RegisterForGraphicUpdate (); NotifyValueChanged ("Visible", _isVisible); @@ -803,10 +804,10 @@ namespace Crow //size constrain if (Slot.Width < MinimumSize.Width) { Slot.Width = MinimumSize.Width; - NotifyValueChanged ("WidthPolicy", Measure.Stretched); + //NotifyValueChanged ("WidthPolicy", Measure.Stretched); } else if (Slot.Width > MaximumSize.Width && MaximumSize.Width > 0) { Slot.Width = MaximumSize.Width; - NotifyValueChanged ("WidthPolicy", Measure.Stretched); + //NotifyValueChanged ("WidthPolicy", Measure.Stretched); } } else Slot.Width = 0; @@ -830,10 +831,10 @@ namespace Crow //size constrain if (Slot.Height < MinimumSize.Height) { Slot.Height = MinimumSize.Height; - NotifyValueChanged ("HeightPolicy", Measure.Stretched); + //NotifyValueChanged ("HeightPolicy", Measure.Stretched); } else if (Slot.Height > MaximumSize.Height && MaximumSize.Height > 0) { Slot.Height = MaximumSize.Height; - NotifyValueChanged ("HeightPolicy", Measure.Stretched); + //NotifyValueChanged ("HeightPolicy", Measure.Stretched); } } else Slot.Height = 0; diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs index 54871241..8daf9550 100644 --- a/src/GraphicObjects/ListBox.cs +++ b/src/GraphicObjects/ListBox.cs @@ -207,6 +207,9 @@ namespace Crow } protected void _list_LayoutChanged (object sender, LayoutingEventArgs e) { +#if DEBUG_LAYOUTING + Debug.WriteLine("list_LayoutChanged"); +#endif if (_gsList.Orientation == Orientation.Horizontal) { if (e.LayoutType == LayoutingType.Width) _gsList.Width = approxSize; |