aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GenericStack.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-06-02 10:44:23 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-06-02 10:44:23 +0200
commitb56c22ad826a49b7ea0013c1ca78cf64169fc326 (patch)
tree588a3bc9ae0ed826012096a072b138a94ded4e61 /src/GraphicObjects/GenericStack.cs
parent999f18b6daf7db54879a85f0f8b5c7b22f740ce7 (diff)
TemplatedControls, Picture objects for pixmap and svg raw data sharing
among controls
Diffstat (limited to 'src/GraphicObjects/GenericStack.cs')
-rw-r--r--src/GraphicObjects/GenericStack.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs
index f34e13d3..5759bac4 100644
--- a/src/GraphicObjects/GenericStack.cs
+++ b/src/GraphicObjects/GenericStack.cs
@@ -70,15 +70,19 @@ namespace go
tmp.Width += c.Slot.Width + Spacing;
tmp.Height = Math.Max (tmp.Height, c.Slot.Bottom);
}
+ if (tmp.Width > 0)
+ tmp.Width -= Spacing;
} else {
foreach (GraphicObject c in Children) {
tmp.Width = Math.Max (tmp.Width, c.Slot.Right);
tmp.Height += c.Slot.Height + Spacing;
}
+ if (tmp.Height > 0)
+ tmp.Height -= Spacing;
}
- tmp.Width += 2*Margin;
- tmp.Height += 2*Margin;
+ tmp.Width += 2 * Margin;
+ tmp.Height += 2 * Margin;
return tmp;
}
@@ -89,11 +93,13 @@ namespace go
foreach (GraphicObject c in Children) {
c.Slot.X = d;
d += c.Slot.Width + Spacing;
+ c.RegisterForLayouting ((int)LayoutingType.Y);
}
} else {
foreach (GraphicObject c in Children) {
c.Slot.Y = d;
d += c.Slot.Height + Spacing;
+ c.RegisterForLayouting ((int)LayoutingType.X);
}
}
}