aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Group.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-04-14 09:36:03 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-04-14 12:47:15 +0200
commit7ff5f14fe6b875dff57b335c4eeeb42397a07c91 (patch)
tree23f80be40c98b4d142894a607c8dd2f43112b523 /src/GraphicObjects/Group.cs
parent0b005fefe69b67bf335c3c00944bbac73e8b4831 (diff)
proportional ui
Diffstat (limited to 'src/GraphicObjects/Group.cs')
-rw-r--r--src/GraphicObjects/Group.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs
index 47795b06..78c5bca3 100644
--- a/src/GraphicObjects/Group.cs
+++ b/src/GraphicObjects/Group.cs
@@ -139,7 +139,7 @@ namespace Crow
if (largestChild == null){
//if still null, not possible to determine a width
//because all children are stretched, force first one to fit
- Children[0].Width = -1;
+ Children[0].Width = Measure.Fit;
return -1;//cancel actual sizing to let child computation take place
}
return maxChildrenWidth + 2 * Margin;
@@ -147,7 +147,7 @@ namespace Crow
if (tallestChild == null)
searchTallestChild ();
if (tallestChild == null) {
- Children[0].Height = -1;
+ Children[0].Height = Measure.Fit;
return -1;
}
return maxChildrenHeight + 2 * Margin;
@@ -178,14 +178,14 @@ namespace Crow
if (g.Slot.Width > maxChildrenWidth) {
maxChildrenWidth = g.Slot.Width;
largestChild = g;
- if (Width < 0)
+ if (Width == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Width);
} else if (g == largestChild) {
largestChild = null;
maxChildrenWidth = 0;
- if (Width < 0)
+ if (Width == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Width);
}
break;
@@ -193,14 +193,14 @@ namespace Crow
if (g.Slot.Height > maxChildrenHeight) {
maxChildrenHeight = g.Slot.Height;
tallestChild = g;
- if (Height < 0)
+ if (Height == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Height);
} else if (g == tallestChild) {
tallestChild = null;
maxChildrenHeight = 0;
- if (Height < 0)
+ if (Height == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Height);
}
break;