aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-12-25 14:02:02 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2015-12-25 14:02:02 +0100
commitf2f2752d605d81510db042b27bc9471d8e27c2ea (patch)
tree9417278cb08a6de62e1ae288191d2898762efa22 /src/GraphicObjects
parent6306b8746bde40af1fb5938a1c92b12dd1175ea4 (diff)
implement sizing check in UpdateLayout
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/GraphicObject.cs20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 5f919e64..fe707957 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -500,12 +500,6 @@ namespace go
Interface.LayoutingQueue.RemoveAll (lq => lq.GraphicObject == this && (layoutType & (int)lq.LayoutType) > 0);
if ((layoutType & (int)LayoutingType.Width) > 0) {
-
- //force sizing to fit if parent is sizing on children and
- //this object has stretched size
-// if (Parent.getBounds ().Width < 0 && Width == 0)
-// Width = -1;
-
if (Bounds.Width == 0) //stretch in parent
Interface.LayoutingQueue.EnqueueAfterParentSizing (LayoutingType.Width, this);
else if (Bounds.Width < 0) //fit
@@ -515,11 +509,6 @@ namespace go
}
if ((layoutType & (int)LayoutingType.Height) > 0) {
-
- //force sizing to fit if parent is sizing on children
-// if (Parent.getBounds ().Height < 0 && Height == 0)
-// Height = -1;
-
if (Bounds.Height == 0) //stretch in parent
Interface.LayoutingQueue.EnqueueAfterParentSizing (LayoutingType.Height, this);
else if (Bounds.Height < 0) //fit
@@ -647,6 +636,11 @@ namespace go
LastSlots.Y = Slot.Y;
break;
case LayoutingType.Width:
+ //force sizing to fit if parent is sizing on children and
+ //this object has stretched size
+ if (Parent.getBounds ().Width < 0 && Width == 0)
+ Width = -1;
+
if (Width > 0)
Slot.Width = Width;
else if (Width < 0)
@@ -670,6 +664,10 @@ namespace go
LastSlots.Width = Slot.Width;
break;
case LayoutingType.Height:
+ //force sizing to fit if parent is sizing on children
+ if (Parent.getBounds ().Height < 0 && Height == 0)
+ Height = -1;
+
if (Height > 0)
Slot.Height = Height;
else if (Height < 0)