MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}" MouseClick="butQuitPress"/>\r
</HorizontalStack>\r
</Border>\r
- <Container Name="Content" Margin="1" Width="0" Height="0"/>\r
+ <Container Name="Content" Margin="0" Width="0" Height="0"/>\r
</VerticalStack>\r
</Border>
\ No newline at end of file
{\r
base.OnLoad (e);\r
\r
- this.Cursor = XCursor.NE;\r
-\r
-\r
LoadInterface("Interfaces/test4.goml", out c);\r
//LoadInterface("golibtests/test4.xml", out c2);\r
//c2.HorizontalAlignment = HorizontalAlignment.Left;\r
: base(1024, 600,"test")\r
{}\r
\r
- VerticalStack g;\r
-\r
protected override void OnLoad (EventArgs e)\r
{\r
base.OnLoad (e);\r
- LoadInterface("Interfaces/test_stack.goml", out g);\r
+ LoadInterface("Interfaces/test_stack.goml");\r
\r
}\r
- protected override void OnRenderFrame (FrameEventArgs e)\r
- {\r
- GL.Clear (ClearBufferMask.ColorBufferBit);\r
- base.OnRenderFrame (e);\r
- SwapBuffers ();\r
- }\r
\r
protected override void OnUpdateFrame (FrameEventArgs e)\r
{\r
TextAlignment="Center" Background="AoEnglish"/>\r
</HorizontalStack>\r
</VerticalStack>\r
- <HorizontalStack Height="350" Width="150">\r
- <Scroller Name="scroller1" Background="DimGray" Height="0" Width="0" \r
+ <HorizontalStack Height="350" Width="-1">\r
+ <Scroller Name="scroller1" Background="DimGray" Height="0" Width="-1" \r
Margin="5" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">\r
<VerticalStack Name="colors" VerticalAlignment="Top" Margin="1">\r
<ProgressBar Name="pbBar2" Width="100" Height="20" Value="50"\r
<!--<Group>-->\r
<Window Name="window1" Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0,5;0,5;0,5;0,5" \r
Focusable="True">\r
- <VerticalStack Height="0" Width="0">\r
- <Slider Name="slider" Height="10" Width="150"/>\r
- <Label Text="{fps}" Background="DarkRed"/>\r
- <Label Text="{fpsMin}" />\r
- <Label Text="{fpsMax}" />\r
- <HorizontalStack Width="150" Height="-1" Margin="5" Background="Red">\r
+ <VerticalStack Name="contentVSStack" Height="0" Width="0" Margin="1" Spacing="10">\r
+ <Slider Name="slider" Height="20" Width="0"/>\r
+\r
+ <HorizontalStack Width="0" Height="-1" Margin="0" Background="Red">\r
<Checkbox Height="-1" Width="-1"/>\r
<Checkbox Height="-1" Width="-1"/>\r
</HorizontalStack>\r
- <GroupBox Title="test" Height="-1" Width="-1" Margin="5">\r
- <VerticalStack Width="100">\r
+ <GroupBox Title="test" Height="0" Width="0" Margin="0">\r
+ <VerticalStack Width="0">\r
<RadioButton Caption="Radio 1"/>\r
<RadioButton Caption="Radio 2" IsChecked="true"/>\r
<RadioButton Caption="Radio 3"/>\r
-\r
+ <RadioButton Caption="Radio 4"/>\r
+ <RadioButton Caption="Radio 5"/>\r
+ <RadioButton Caption="Radio 6"/>\r
+ <RadioButton Caption="Radio 7"/>\r
</VerticalStack>\r
</GroupBox>\r
+<!-- <Checkbox Height="-1" Width="-1" Background="Red" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Right"/>-->\r
</VerticalStack>\r
</Window>\r
<!--</Group>-->\r
+<!-- <Label Text="{fps}" Background="DarkRed"/>\r
+ <Label Text="{fpsMin}" />\r
+ <Label Text="{fpsMax}" />-->
\ No newline at end of file
<?xml version="1.0"?>\r
-<VerticalStack Background="DarkBlue" Height="-1" Width="200">\r
- <Label Text="label11" Width="0" Background="Green"/>\r
- <Label Text="label21"/>\r
+<VerticalStack Background="DarkBlue" Height="300" Width="200">\r
+<!-- <Label Text="label11" Width="0" Background="Green"/>\r
+ <Label Text="label21"/>-->\r
<!-- <HorizontalStack Width="-1" Height="-1" Margin="5"\r
Focusable="True" Background="Blue">\r
<Label Text="label12"/>\r
<Label Text="label52"/>\r
</HorizontalStack>\r
<Label Text="label33" Background="Green" Width="0"/>-->\r
+<!-- <Label Text="label43"/>-->\r
+ <Border Margin="10">\r
+ <Label Text="label53" Background="Red" Height="0" CornerRadius="10"/>\r
+ </Border>\r
+ <Label Text="label43"/>\r
<Label Text="label43"/>\r
- <Label Text="label53"/>\r
-\r
</VerticalStack>\r
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>test3.GOLIBTest_HStack</StartupObject>
+ <StartupObject>test.GOLIBTest_4</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<OutputPath>..\bin\$(configuration)</OutputPath>
<IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath>
if (Orientation == Orientation.Horizontal) {\r
foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) {\r
tmp.Width += c.Slot.Width + Spacing;\r
- tmp.Height = Math.Max (tmp.Height, c.Slot.Bottom);\r
+ tmp.Height = Math.Max (tmp.Height, Math.Max(c.Slot.Bottom, c.Slot.Height));\r
}\r
if (tmp.Width > 0)\r
tmp.Width -= Spacing;\r
} else {\r
foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) {\r
- tmp.Width = Math.Max (tmp.Width, c.Slot.Right);\r
+ tmp.Width = Math.Max (tmp.Width, Math.Max(c.Slot.Right, c.Slot.Width));\r
tmp.Height += c.Slot.Height + Spacing;\r
}\r
if (tmp.Height > 0)\r
else if (gobjs.Length == 1) {\r
int sz = Children.Where(ch=>ch.Visible).Except (gobjs).Sum (g => g.Slot.Width);\r
if (sz < Slot.Width) {\r
- gobjs [0].Slot.Width = Slot.Width - sz - (Children.Count-1) * Spacing;\r
+ gobjs [0].Slot.Width = Slot.Width - sz - (Children.Count-1) * Spacing - 2 * Margin;\r
int idx = Children.IndexOf (gobjs [0]);\r
if (idx > 0 && idx < Children.Count - 1)\r
gobjs [0].Slot.Width -= Spacing;\r
if (gobjs [0].LastSlots.Width != gobjs [0].Slot.Width) {\r
gobjs [0].bmp = null;\r
- //gobjs [0].OnLayoutChanges (LayoutingType.Width);\r
+ gobjs [0].OnLayoutChanges (LayoutingType.Width);\r
gobjs [0].LastSlots.Width = gobjs [0].Slot.Width;\r
}\r
}\r
else if (gobjs.Length == 1) {\r
int sz = Children.Where(ch=>ch.Visible).Except (gobjs).Sum (g => g.Slot.Height);\r
if (sz < Slot.Height) {\r
- gobjs [0].Slot.Height = Slot.Height - sz- (Children.Count-1) * Spacing;\r
+ gobjs [0].Slot.Height = Slot.Height - sz- (Children.Count-1) * Spacing - 2 * Margin;\r
int idx = Children.IndexOf (gobjs [0]);\r
if (idx > 0 && idx < Children.Count - 1)\r
gobjs [0].Slot.Height -= Spacing;\r
if (gobjs [0].LastSlots.Height != gobjs [0].Slot.Height) {\r
gobjs [0].bmp = null;\r
+ gobjs [0].OnLayoutChanges (LayoutingType.Height);\r
gobjs [0].LastSlots.Height = gobjs [0].Slot.Height;\r
}\r
}\r
int crw = ClientRectangle.Width;\r
foreach (GraphicObject c in Children.Where(ch => ch.Slot.Width != crw && ch.Visible))\r
c.RegisterForLayouting ((int)LayoutingType.X); \r
+ } else {\r
+ foreach (GraphicObject c in Children.Where(ch => ch.Width == 0 && ch.Visible))\r
+ c.RegisterForLayouting ((int)LayoutingType.Width); \r
}\r
break;\r
case LayoutingType.Height:\r
int crh = ClientRectangle.Height;\r
foreach (GraphicObject c in Children.Where(ch => ch.Slot.Height != crh && ch.Visible))\r
c.RegisterForLayouting ((int)LayoutingType.Y); \r
+ } else {\r
+ foreach (GraphicObject c in Children.Where(ch => ch.Height == 0 && ch.Visible))\r
+ c.RegisterForLayouting ((int)LayoutingType.Height); \r
}\r
break;\r
}\r
this.Width += e.XDelta;
this.Height += e.YDelta;
break;
- }
-
- this.RegisterForLayouting ((int)LayoutingType.All);
+ }
}
public override void onMouseLeave (object sender, MouseMoveEventArgs e)
{