aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Splitter.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-04-30 13:03:33 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-04-30 13:03:33 +0200
commit02ac8178673249c2d1af60d7b291d8b40419bcd8 (patch)
tree672b1242b2d31ed159916ed32b99147279fcc758 /src/GraphicObjects/Splitter.cs
parent8771dccd2369447a50485c7649e8a0851b551958 (diff)
glfw backend, group measure on change only
Diffstat (limited to 'src/GraphicObjects/Splitter.cs')
-rw-r--r--src/GraphicObjects/Splitter.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GraphicObjects/Splitter.cs b/src/GraphicObjects/Splitter.cs
index 6a1f2254..527b4084 100644
--- a/src/GraphicObjects/Splitter.cs
+++ b/src/GraphicObjects/Splitter.cs
@@ -83,14 +83,14 @@ namespace Crow
if (gs.Orientation == Orientation.Horizontal) {
if (ptrThis >= 0)
- gs.Children [ptrThis - 1].Width = Math.Max(gs.Children [ptrThis - 1].Slot.Width + e.XDelta*2, 1);
+ gs.Children [ptrThis - 1].Width = Math.Max(gs.Children [ptrThis - 1].Slot.Width + e.XDelta, 1);
if (ptrThis < gs.Children.Count - 1)
- gs.Children [ptrThis + 1].Width = Math.Max(gs.Children [ptrThis + 1].Slot.Width - e.XDelta*2, 1);
+ gs.Children [ptrThis + 1].Width = Math.Max(gs.Children [ptrThis + 1].Slot.Width - e.XDelta, 1);
} else {
if (ptrThis >= 0)
- gs.Children [ptrThis - 1].Height = Math.Max(gs.Children [ptrThis - 1].Slot.Height + e.YDelta*2, 1);
+ gs.Children [ptrThis - 1].Height = Math.Max(gs.Children [ptrThis - 1].Slot.Height + e.YDelta, 1);
if (ptrThis < gs.Children.Count - 1)
- gs.Children [ptrThis + 1].Height = Math.Max(gs.Children [ptrThis + 1].Slot.Height - e.YDelta*2, 1);
+ gs.Children [ptrThis + 1].Height = Math.Max(gs.Children [ptrThis + 1].Slot.Height - e.YDelta, 1);
}
}
public override bool UpdateLayout (LayoutingType layoutType)
@@ -100,12 +100,12 @@ namespace Crow
if (gs.Orientation == Orientation.Horizontal)
Width = thickness;
else
- Width = 0;
+ Width = Measure.Stretched;
} else if (layoutType == LayoutingType.Height){
if (gs.Orientation == Orientation.Vertical)
Height = thickness;
else
- Height = 0;
+ Height = Measure.Stretched;
}
return base.UpdateLayout (layoutType);
}