aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests/Interfaces
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-09-12 21:46:14 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-09-12 21:46:14 +0200
commit11dcc340f08a142f807419b85ff07d45f870e8e5 (patch)
tree342576cea03d06eac4f5d5f2f50e62d1d456d6b0 /Tests/Interfaces
parent8624ae1ead48d7ddc206486db0c4fc024afac703 (diff)
update template and tests with new sizing policy for stacks (stretched
by default)
Diffstat (limited to 'Tests/Interfaces')
-rwxr-xr-xTests/Interfaces/fps.goml10
-rwxr-xr-xTests/Interfaces/test4.goml148
-rwxr-xr-xTests/Interfaces/testExpandable.goml2
-rwxr-xr-xTests/Interfaces/testHStack.goml6
-rwxr-xr-xTests/Interfaces/testWindow.goml14
5 files changed, 100 insertions, 80 deletions
diff --git a/Tests/Interfaces/fps.goml b/Tests/Interfaces/fps.goml
index 151d9905..edc63e70 100755
--- a/Tests/Interfaces/fps.goml
+++ b/Tests/Interfaces/fps.goml
@@ -3,20 +3,20 @@
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="10" Width="-1" Height="-1" Focusable="True" >
- <VerticalStack Name="vsFps" BorderWidth="1" Margin="5" Spacing="4">
- <HorizontalStack>
+ <VerticalStack Name="vsFps" BorderWidth="1" Margin="5" Spacing="4" Fit="true">
+ <HorizontalStack Height="-1">
<Label Text="Update:" FontColor="White" />
<Label Name="labUpdate" Text="{update}" FontSize="12" Background="DarkGreen"/>
</HorizontalStack>
- <HorizontalStack Name="hsFps" Background="Red" >
+ <HorizontalStack Height="-1" Name="hsFps" Background="Red" >
<Label Name="captionFps" Text="Fps:" />
<Label Name="valueFps" Text="{fps}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
- <HorizontalStack Background="Red">
+ <HorizontalStack Height="-1" Background="Red">
<Label Text="Min:" Width = "30" />
<Label Text="{fpsMin}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
- <HorizontalStack Background="Red" >
+ <HorizontalStack Height="-1" Background="Red" >
<Label Text="Max:" Width = "30"/>
<Label Text="{fpsMax}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
diff --git a/Tests/Interfaces/test4.goml b/Tests/Interfaces/test4.goml
index 4d824a2e..d2866bb6 100755
--- a/Tests/Interfaces/test4.goml
+++ b/Tests/Interfaces/test4.goml
@@ -1,91 +1,64 @@
<?xml version="1.0"?>
-<Group Name="MainGrp" Focusable="true"
+<Group Name="MainGrp"
Width="800" Height="500"
Background="0,5;0,5;0,5;0,5" Foreground="White"
Margin="10" >
- <Border Margin="10"
+ <Border Margin="10" CornerRadius="10"
Name="mainBorder"
BorderWidth="2" BorderColor="Transparent"
Focusable="True"
MouseEnter="{BorderColor = White}"
MouseLeave="{BorderColor = Transparent}">
-
- <HorizontalStack Name="hs0"
- WidgetSpacing="1"
- VerticalAlignment="Top">
- <Slider Orientation="Vertical" Height="300" Width="10" Background="Transparent" />
- <VerticalStack Name="vs1" Spacing="5">
- <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />
- <Label Name="labMouse" Text="MousePos"/>
- <HorizontalStack WidgetSpacing="10">
- <VerticalStack Width="100">
- <Checkbox Name="chk1" Focusable="true"/>
+ <HorizontalStack WidgetSpacing="1">
+ <VerticalStack Width="-1">
+ <HorizontalStack WidgetSpacing="1" Fit="true">
+ <VerticalStack Fit="true">
+ <Label Text="{MousePosition}"/>
+ <HorizontalStack Name="hsFocus" Fit="true">
+ <Label Text="Focused:"/>
+ <Label Name="labFocus"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Active:" Name="hsActive"/>
+ <Label Name="labActive"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Hover:" Name="hsHover"/>
+ <Label Name="labHover"/>
+ </HorizontalStack>
+ </VerticalStack>
+ <VerticalStack Fit="true">
+ <Checkbox Name="chk1"/>
<Checkbox Name="chk2" IsChecked="true"/>
- <Checkbox Name="chk3" Template="#go.Templates.Checkbox2.goml"/>
- <Checkbox Name="chk4">
+ <Checkbox Name="chk4" >
<Template>
- <HorizontalStack Margin="0" Spacing="1" Focusable="false">
- <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>
- <Label Name="Caption" Foreground="Black" Background="Yellow"/>
+ <HorizontalStack Fit="True" Margin="0" Spacing="1">
+ <Image Name="Image" Width="20" Height="20" Path="#go.Images.Icons.checkbox.svg"/>
+ <Label Name="Caption" Height="-1" Width="-1" Foreground="Black" Background="Yellow"/>
</HorizontalStack>
</Template>
</Checkbox>
</VerticalStack>
- <VerticalStack Width="100">
+ <VerticalStack Fit="true">
<RadioButton IsChecked="true"/>
<RadioButton/>
<RadioButton>
<Template>
- <HorizontalStack Background="Green" Margin="0" Spacing="1" Focusable="false">
- <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.radiobutton.svg"/>
+ <HorizontalStack Fit="true" Background="Green" Margin="0" Spacing="1" Focusable="false">
+ <Image Name="Image" Width="20" Height="20" Path="#go.Images.Icons.radiobutton.svg"/>
<Label Name="Caption"/>
</HorizontalStack>
</Template>
</RadioButton>
- <RadioButton/>
</VerticalStack>
- <Spinner Width="50" Value="5"></Spinner>
- </HorizontalStack>
-<!-- <ListBox Data="{TestList}"></ListBox>-->
- <HorizontalStack Name="hsPbar" Margin="5">
- <ProgressBar Name="pbBar"
- Width="200" Height="20"
- Minimum="0"
- Maximum="200"
- Value="{fps}"
- Foreground="BlueCrayola" Background="DarkGray"
- BorderWidth="2" BorderColor="White"/>
-<!-- <Label Name="labPb"
- Width="30"
- TextAlignment="RightCenter"/>-->
- </HorizontalStack>
- <HorizontalStack Name="hsFocus">
- <Label Text="Focused:"/>
- <Label Name="labFocus"/>
- </HorizontalStack>
- <HorizontalStack>
- <Label Text="Active:" Name="hsActive"/>
- <Label Name="labActive"/>
- </HorizontalStack>
- <HorizontalStack>
- <Label Text="Hover:" Name="hsHover"/>
- <Label Name="labHover"/>
</HorizontalStack>
- <Button Margin="5" BorderWidth="0" Width="-1" Height="-1" HorizontalAlignment="Center">
- <Label FontSize="18" Text="This is a test" Margin="5" Foreground="Black" />
- </Button>
<TextBoxWidget Name="textbox1" TextAlignment="LeftCenter" Font="droid,14"
- Width="300" Height="-1" Margin="2"
- BorderColor="White" BorderWidth="1"
+ Width="200" Height="-1" Margin="2" Background="White"
+ Forground="Black"
+ BorderColor="DimGray" BorderWidth="1"
Text="editable text"/>
- <GroupBox Title="Group Box" Width="300" Height="100"
- BorderColor="White" BorderWidth="2" Margin="3">
- <Label Name="labValue" FontSize="14" Text="{../../slider.Value}" TextAlignment="Center"/>
- </GroupBox>
- <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />
- <GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>
</VerticalStack>
- <VerticalStack Width="-1" Height="-1" Margin="0" WidgetSpacing="1">
+ <VerticalStack Fit="true" Margin="0" WidgetSpacing="1">
<Button Margin="1" Width="150" Height="100">
<Image Path="#Tests.image.tetra.png"/>
</Button>
@@ -116,7 +89,7 @@
</Expandable>
<HorizontalStack>
<Label Text="Update" FontColor="White"/>
- <Label Name="labUpdate" Text="xxxx" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>
+ <Label Name="labUpdate" Text="{update}" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>
</HorizontalStack>
<HorizontalStack>
<Label Text="Fps:" Width = "30"/>
@@ -134,6 +107,53 @@
TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
</VerticalStack>
+ <HorizontalStack Width="-1">
+ <Scroller Name="scroller1" Background="DimGray" Width="-1"
+ Margin="5" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
+ <VerticalStack Name="colors" VerticalAlignment="Top" Margin="1" Fit="true">
+ <ProgressBar Name="pbBar2" Width="100" Height="20" Value="50"
+ BorderWidth="2" BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>
+ <ProgressBar Width="100" Height="20" Value="{fps}" BorderWidth="2"
+ BorderColor="White" Foreground="BlueCrayola" Background="DarkGray"/>
+ </VerticalStack>
+ </Scroller>
+ <Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"
+ Orientation="Vertical" Width="16" />
+ </HorizontalStack>
+ </HorizontalStack>
+<!-- <HorizontalStack Name="hs0"
+ WidgetSpacing="1"
+ VerticalAlignment="Top">
+ <Slider Orientation="Vertical" Height="300" Width="10" Background="Transparent" />
+ <VerticalStack Name="vs1" Spacing="5">
+ <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />
+ <HorizontalStack WidgetSpacing="10">
+
+
+ <Spinner Width="50" Value="5"></Spinner>
+ </HorizontalStack>
+ <HorizontalStack Name="hsPbar" Margin="5">
+ <ProgressBar Name="pbBar"
+ Width="200" Height="20"
+ Minimum="0"
+ Maximum="200"
+ Value="{fps}"
+ Foreground="BlueCrayola" Background="DarkGray"
+ BorderWidth="2" BorderColor="White"/>
+ </HorizontalStack>
+
+ <Button Margin="5" BorderWidth="0" Width="-1" Height="-1" HorizontalAlignment="Center">
+ <Label FontSize="18" Text="This is a test" Margin="5" Foreground="Black" />
+ </Button>
+
+ <GroupBox Title="Group Box" Width="300" Height="100"
+ BorderColor="White" BorderWidth="2" Margin="3">
+ <Label Name="labValue" FontSize="14" Text="{../../slider.Value}" TextAlignment="Center"/>
+ </GroupBox>
+ <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />
+ <GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>
+ </VerticalStack>
+
<HorizontalStack Height="350" Width="-1">
<Scroller Name="scroller1" Background="DimGray" Height="0" Width="-1"
Margin="5" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
@@ -148,10 +168,10 @@
Orientation="Vertical" Width="16" />
</HorizontalStack>
</HorizontalStack>
-
- <Slider
+-->
+<!-- <Slider
Height="20" Width="100"
Background="Transparent"
- VerticalAlignment="Bottom" />
+ VerticalAlignment="Bottom" />-->
</Border>
</Group> \ No newline at end of file
diff --git a/Tests/Interfaces/testExpandable.goml b/Tests/Interfaces/testExpandable.goml
index a292cdde..0caf0a32 100755
--- a/Tests/Interfaces/testExpandable.goml
+++ b/Tests/Interfaces/testExpandable.goml
@@ -3,7 +3,7 @@
Margin="20" Focusable="True" Background="Gray">
<Expandable Width="150" Height="-1" Margin="2" VerticalAlignment="Top">
- <VerticalStack Width="100" >
+ <VerticalStack Width="100" Height="-1">
<Checkbox Name="chk1"/>
<Checkbox Name="chk2" IsChecked="true"/>
<Checkbox Name="chk3"/>
diff --git a/Tests/Interfaces/testHStack.goml b/Tests/Interfaces/testHStack.goml
index 8e4083a0..ac03eac9 100755
--- a/Tests/Interfaces/testHStack.goml
+++ b/Tests/Interfaces/testHStack.goml
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<!--<HorizontalStack Background="Gray" Margin="1">-->
-<Group Background="Gray" Margin="5" Height="-1" Width="-1">
+<Group Background="Gray" Margin="5" Height="200" Width="300">
<VerticalStack Background="Green" Margin="1">
- <HorizontalStack Width="-1" Height="-1" Margin="5" Background="Red">
- <Checkbox Height="100" Width="200" Background="Blue"/>
+ <HorizontalStack Width="0" Height="0" Margin="5" Background="Red">
+ <Checkbox Height="-1" Width="100" Background="Blue"/>
<!-- <Checkbox Height="-1" Width="-1"/>-->
</HorizontalStack>
</VerticalStack>
diff --git a/Tests/Interfaces/testWindow.goml b/Tests/Interfaces/testWindow.goml
index efad1d8f..b336a9dc 100755
--- a/Tests/Interfaces/testWindow.goml
+++ b/Tests/Interfaces/testWindow.goml
@@ -4,9 +4,9 @@
Focusable="True" CornerRadius="20" MinimumSize="100;100" MaximumSize="500;500">
<Template>
<Border BorderWidth="1" BorderColor="White" Margin="0" CornerRadius="20">
- <VerticalStack Height="0" Width="0" Margin="0">
- <Border BorderWidth="1" BorderColor="White" Height="-1" Width="0" Background="0,1;0,5;1,0;0,5">
- <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Width="0" Focusable="false" >
+ <VerticalStack Margin="0">
+ <Border BorderWidth="1" BorderColor="White" Height="-1" Background="0,1;0,5;1,0;0,5">
+ <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Focusable="false" >
<GraphicObject Width="5" Height="0"/>
<Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>
<Label Foreground="White" Width="0" Name="Title" Margin="1" TextAlignment="Center" />
@@ -22,15 +22,15 @@
</VerticalStack>
</Border>
</Template>
- <VerticalStack Name="contentVSStack" Height="0" Width="0" Margin="10" Spacing="10">
+ <VerticalStack Name="contentVSStack" Margin="10" Spacing="10">
<Slider Name="slider" Height="10" Width="0"/>
<HorizontalStack Width="-1" Height="-1" Margin="0" Background="Red">
- <Checkbox Height="-1" Width="-1"/>
- <Checkbox Height="-1" Width="-1"/>
+ <Checkbox Height="-1" Width="100"/>
+ <Checkbox Height="-1" Width="100"/>
</HorizontalStack>
<GroupBox Title="test" Height="-1" Width="-1" Margin="5">
- <VerticalStack Width="-1">
+ <VerticalStack Height="-1" Width="-1">
<RadioButton Caption="Radio 1"/>
<RadioButton Caption="Radio 2" IsChecked="true"/>
<RadioButton Caption="Radio 3"/>