Skip to content

Commit faad767

Browse files
authored
Inherited dims (#31)
* Implement 'Inherit' measure to reduce bindings load. modifié : Templates/ArrowButTemplate.crow modifié : Templates/Button.template modifié : Templates/CheckBox.template modifié : Templates/ComboBox.template modifié : Templates/DirectoryView.template modifié : Templates/Expandable.template modifié : Templates/GroupBox.template modifié : Templates/ListBox.template modifié : Templates/Menu.template modifié : Templates/MenuItem.template modifié : Templates/MessageBox.template modifié : Templates/Popper.template modifié : Templates/RadioButton.template modifié : Templates/ScrollBar.template modifié : Templates/ScrollingListBox.goml modifié : Templates/Spinner.template modifié : Templates/TabItem.template modifié : Templates/TreeView.template modifié : Templates/Window.template modifié : Templates/treeList.crow modifié : Tests/Interfaces/Container/0.crow modifié : Tests/Interfaces/TemplatedContainer/testTreeView.crow modifié : Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow modifié : Tests/Interfaces/TmpExpandable.goml modifié : Tests/Interfaces/treeList.crow modifié : Tests/ui/Popper.template modifié : Tests/ui/tmpWindow.crow modifié : src/GraphicObjects/GraphicObject.cs modifié : src/Measure.cs * leave template bindings for sizing in ScrollBar template because Inherited values are not working. modifié : Templates/ScrollBar.template renommé : Tests/Interfaces/TemplatedControl/testScrollbar.goml -> Tests/Interfaces/TemplatedControl/testScrollbar.crow renommé : Tests/Interfaces/TemplatedControl/testSpinner.goml -> Tests/Interfaces/TemplatedControl/testSpinner.crow modifié : Tests/Tests.csproj * update nuspec
1 parent 2616e6e commit faad767

33 files changed

+111
-122
lines changed

Crow.OpenTK.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>Crow.OpenTK</id>
5-
<version>0.4.8</version>
5+
<version>0.4.10</version>
66
<title>C# Rapid Open Widget Toolkit</title>
77
<authors>JP Bruyere</authors>
88
<owners>Grand Tetras Software</owners>

Templates/ArrowButTemplate.crow

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0"?>
22
<Border Name="Content"
33
Background="vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black" Foreground="DarkGray"
4-
Height="{../HeightPolicy}" Width="{../WidthPolicy}"
54
MouseEnter="{Foreground=White}"
65
MouseLeave="{Foreground=DarkGray}"
76
MouseDown="{Background=vgradient|0:Black|0.1:LightGray|0.9:LightGray|1:White}"

Templates/Button.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<Border Background="{./Background}" MinimumSize="50,20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
3-
Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
2+
<Border Background="{./Background}" MinimumSize="50,20"
3+
Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
44
MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black;caption.Foreground=White}"
55
MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
66
MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"

Templates/CheckBox.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
2+
<HorizontalStack Style="Control" Background="{./Background}">
33
<Image Style="Icon" Path="#Crow.Images.Icons.checkbox.svg"
44
SvgSub="{./IsChecked}"/>
5-
<Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
5+
<Label Font="{./Font}" Text="{./Caption}"/>
66
</HorizontalStack>

Templates/ComboBox.template

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<?xml version="1.0"?>
2-
<Popper Name="popper" PopDirection="Bottom" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
2+
<Popper Name="popper" PopDirection="Bottom">
33
<Template>
4-
<Border CornerRadius="0" Foreground="LightGray" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
5-
<HorizontalStack Margin="0
6-
" Spacing="1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}">
4+
<Border CornerRadius="0" Foreground="LightGray">
5+
<HorizontalStack Margin="0" Spacing="1">
76
<TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
8-
Text="{../../../../SelectedItem}"
9-
Height="{../../../../HeightPolicy}" Width="{../../../../WidthPolicy}"/>
7+
Text="{../../../../SelectedItem}"/>
108
<Button Width="14" Height="14" Focusable="false"
119
Template="#Crow.Templates.ArrowButTemplate.crow">
1210
<Image Margin="0" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
@@ -18,11 +16,10 @@
1816
MinimumSize="{../../MinimumPopupSize}" Fit="true">
1917
<Scroller Name="scroller1" Margin="2" VerticalScrolling="true"
2018
MaximumSize="0,200"
21-
Height="{../HeightPolicy}" Width="{../WidthPolicy}"
2219
HorizontalAlignment="Left"
2320
ValueChanged="../../../_scroller_ValueChanged">
2421
<VerticalStack LayoutChanged="../../../../_list_LayoutChanged"
25-
Height="Fit" Width="{../../WidthPolicy}" Name="ItemsContainer" Margin="0"
22+
Height="Fit" Name="ItemsContainer" Margin="0"
2623
HorizontalAlignment="Left"
2724
VerticalAlignment="Top"/>
2825
</Scroller>

Templates/DirectoryView.template

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@
1313
<ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos">
1414
<Expandable Caption="{Name}" >
1515
<Template>
16-
<VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
17-
<HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}"
16+
<VerticalStack>
17+
<HorizontalStack Spacing="1" Height="Fit"
1818
MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
1919
MouseLeave="{Background=Transparent}">
2020
<Image Margin="2" Width="12" Height="12"
2121
Path="{./Image}"
2222
SvgSub="{./IsExpanded}"/>
2323
<Image Margin="2" Width="14" Height="14"
2424
Path="#Crow.Images.Icons.folder.svg"/>
25-
<Label Text="{./Caption}" Width="{./WidthPolicy}"/>
25+
26+
<Label Text="{./Caption}"/>
2627
</HorizontalStack>
27-
<Container Name="Content" Visible="false"
28-
Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
28+
<Container Name="Content" Visible="false"/>
2929
</VerticalStack>
3030
</Template>
31-
<HorizontalStack Height="Fit" Width="{./WidthPolicy}">
31+
<HorizontalStack Height="Fit">
3232
<GraphicObject Width="12" Height="10"/>
33-
<TreeView Name="List" Height="Fit" Width="{./WidthPolicy}"
33+
<TreeView Name="List" Height="Fit"
3434
Template="#Crow.Templates.treeList.crow" />
3535
</HorizontalStack>
3636
</Expandable>

Templates/Expandable.template

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?xml version="1.0"?>
2-
<Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}"
3-
Height="{./HeightPolicy}" Width="{./WidthPolicy}">
4-
<VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
5-
<HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}">
2+
<Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}">
3+
<VerticalStack>
4+
<HorizontalStack Spacing="1" Height="Fit">
65
<Image Style="Icon" Margin="2"
76
Visible="{./HasContent}"
87
Path="{./Image}"
98
SvgSub="{./IsExpanded}"/>
10-
<Label Text="{./Caption}" Width="{./WidthPolicy}"/>
9+
<Label Text="{./Caption}"/>
1110
</HorizontalStack>
12-
<Container Name="Content" Visible="false"
13-
Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
11+
<Container Name="Content" Visible="false"/>
1412
</VerticalStack>
1513
</Border>

Templates/GroupBox.template

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0"?>
2-
<Container Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
3-
<Group Height="{./HeightPolicy}" Width="{./WidthPolicy}">
4-
<VerticalStack Spacing="0"
5-
Height="{./HeightPolicy}" Width="{./WidthPolicy}">
6-
<GraphicObject Height="6" Width="{./WidthPolicy}"/>
7-
<Border CornerRadius="5" BorderWidth="1" Margin="10" Foreground="{./Foreground}"
8-
Height="{./HeightPolicy}" Width="{./WidthPolicy}">
9-
<Container Name="Content" Margin="0" MinimumSize="70,10"
10-
Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"/>
2+
<Container Background="{./Background}">
3+
<Group>
4+
<VerticalStack Spacing="0">
5+
<GraphicObject Height="6"/>
6+
<Border CornerRadius="5" BorderWidth="1" Margin="10" Foreground="{./Foreground}">
7+
<Container Name="Content" Margin="0" MinimumSize="70,10"/>
118
</Border>
129
</VerticalStack>
1310
<Label Text="{./Caption}" VerticalAlignment="Top" Left="8"

Templates/ListBox.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0"?>
2-
<Border BorderWidth="1" Margin="1" MinimumSize="10,10" Height="{./HeightPolicy}" Width="{./WidthPolicy}" >
2+
<Border BorderWidth="1" Margin="1" MinimumSize="10,10">
33
<Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
4-
Height="{./HeightPolicy}" Width="{./WidthPolicy}"
54
ValueChanged="./_scroller_ValueChanged">
65
<VerticalStack LayoutChanged="./_list_LayoutChanged"
7-
Height="Fit" Width="{./WidthPolicy}" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
6+
Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
87
</Scroller>
98
</Border>

Templates/Menu.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
<?xml version="1.0"?>
2-
<HorizontalStack Name="ItemsContainer" Margin="0" Background="{./Background}"
3-
Width="{./WidthPolicy}" Height="{./HeightPolicy}"/>
2+
<HorizontalStack Name="ItemsContainer" Margin="0" Background="{./Background}"/>

Templates/MenuItem.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
MouseLeave="{Foreground=Transparent}"
99
MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
1010
MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
11-
Height="{./HeightPolicy}" Width="{./WidthPolicy}"
1211
MinimumSize = "60,0"
1312
Foreground="Transparent"
1413
Background="{./Background}">

Templates/MessageBox.template

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?xml version="1.0"?>
2-
<Border Height="{./HeightPolicy}" Width="{./WidthPolicy}" CornerRadius="0"
2+
<Border CornerRadius="0"
33
MouseEnter="./onBorderMouseEnter"
44
MouseLeave="./onBorderMouseLeave">
5-
<VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
6-
<Border BorderWidth="0" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
5+
<VerticalStack Background="{./Background}">
6+
<Border BorderWidth="0" Foreground="White" Height="Fit"
77
Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
8-
<HorizontalStack Name="hs" Margin="2" Spacing="1" Width="{./WidthPolicy}" Height="Fit" >
8+
<HorizontalStack Name="hs" Margin="2" Spacing="1" Height="Fit" >
99
<GraphicObject Width="5" Height="5"/>
1010
<Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
11-
<Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
11+
<Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Title}" />
1212
<Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
1313
MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
1414
<Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
@@ -17,9 +17,9 @@
1717
<GraphicObject Width="5" Height="5"/>
1818
</HorizontalStack>
1919
</Border>
20-
<HorizontalStack Margin="5" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
20+
<HorizontalStack Margin="5">
2121
<Image Name="Image" Width="20%" Height="20" Path="#Crow.Images.Icons.iconInfo.svg" />
22-
<Label Margin="5" Font="serif, 10" Height="{./HeightPolicy}" Width="80%" Text="{./Message}"
22+
<Label Margin="5" Font="serif, 10" Width="80%" Text="{./Message}"
2323
TextAlignment="Left"
2424
Multiline="true" />
2525
</HorizontalStack>

Templates/Popper.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0"?>
2-
<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit" Width="{./WidthPolicy}">
3-
<HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}">
2+
<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit">
3+
<HorizontalStack Spacing="1" Height="Fit">
44
<Image Style="Icon" Margin="2"
55
Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
6-
<Label Text="{./Caption}" Width="{./WidthPolicy}"/>
6+
<Label Text="{./Caption}" />
77
</HorizontalStack>
88
</Border>

Templates/RadioButton.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
2+
<HorizontalStack Style="Control" Background="{./Background}">
33
<Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
44
SvgSub="{./IsChecked}"/>
5-
<Label Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
5+
<Label Text="{./Caption}"/>
66
</HorizontalStack>

Templates/ScrollBar.template

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0"?>
2-
<Border BorderWidth="1" Foreground="LightGray" Width="{./WidthPolicy}" Height="{./HeightPolicy}">
3-
<GenericStack Orientation="{./Orientation}" Spacing="0"
4-
Width="{./WidthPolicy}" Height="{./HeightPolicy}">
2+
<Border BorderWidth="1" Foreground="LightGray">
3+
<GenericStack Orientation="{./Orientation}" Spacing="0">
54
<Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
65
Template="#Crow.Templates.ArrowButTemplate.crow">
76
<Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
@@ -10,10 +9,10 @@
109
Orientation="{./Orientation}"
1110
Value="{./Value}"
1211
Maximum="{./Maximum}"
12+
Height="{./HeightPolicy}" Width="{./WidthPolicy}"
1313
LargeIncrement="{./LargeIncrement}"
1414
SmallIncrement="{./SmallIncrement}"
1515
Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"
16-
Width="{./WidthPolicy}" Height="{./HeightPolicy}"
1716
ValueChanged="./onSliderValueChange"/>
1817
<Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
1918
Template="#Crow.Templates.ArrowButTemplate.crow">

Templates/ScrollingListBox.goml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0"?>
2-
<Border BorderWidth="1" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
3-
<HorizontalStack Margin="1" Height="{./HeightPolicy}" Width="{./WidthPolicy}" >
4-
<Scroller Name="scroller1" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
2+
<Border BorderWidth="1" Background="{./Background}">
3+
<HorizontalStack Margin="1">
4+
<Scroller Name="scroller1"
55
Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
66
ValueChanged="./_scroller_ValueChanged">
7-
<VerticalStack Width="{./WidthPolicy}" Height="-1" MinimumSize="10,10"
7+
<VerticalStack Height="Fit" MinimumSize="10,10"
88
Name="ItemsContainer" Margin="0" VerticalAlignment="Top"
99
LayoutChanged="./_list_LayoutChanged"/>
1010
</Scroller>
1111
<ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}"
1212
Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
13-
Width="14" Height="{./HeightPolicy}" />
13+
Width="14" />
1414
</HorizontalStack>
1515
</Border>

Templates/Spinner.template

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0"?>
2-
<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0"
3-
Height="{./HeightPolicy}" Width="{./WidthPolicy}">
4-
<Border BorderWidth="1" Height="{./HeightPolicy}" Width="80%" Background="White"
2+
<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0">
3+
<Border BorderWidth="1" Width="80%" Background="White"
54
Foreground="DimGray" Margin="0">
6-
<Label Foreground="DimGray" Height="{../../../HeightPolicy}" Width="Stretched"
5+
<Label Foreground="DimGray" Width="Stretched"
76
Text="{../../../Value}" TextAlignment="Right" Margin="0"/>
87
</Border>
98
<VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">

Templates/TabItem.template

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0"?>
22
<GenericStack Orientation="Vertical" Spacing="0"
3-
Width="{./WidthPolicy}" Height="{./HeightPolicy}"
43
Background="Onyx"
54
MouseEnter="{caption.Foreground=White}"
65
MouseLeave="{caption.Foreground=Gray}">
@@ -16,7 +15,6 @@
1615
MouseClick="../../../../butCloseTabClick"/>
1716
</Border>
1817
</HorizontalStack>
19-
<Container
20-
Name="Content" Width="{./WidthPolicy}" Height="{./HeightPolicy}"/>
18+
<Container Name="Content"/>
2119
</GenericStack>
2220

Templates/TreeView.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?xml version="1.0"?>
2-
<HorizontalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
2+
<HorizontalStack>
33
<Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
44
Background="{./Background}"
5-
Height="{./HeightPolicy}" Width="{./WidthPolicy}"
65
ScrollY="{../scrollbar1.Value}"
76
ValueChanged="./_scroller_ValueChanged">
87
<VerticalStack LayoutChanged="./_list_LayoutChanged"
9-
Height="Fit" Width="{./WidthPolicy}" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
8+
Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
109
</Scroller>
1110
<ScrollBar
1211
Name="scrollbar1"

Templates/Window.template

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<?xml version="1.0"?>
22
<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
33
Background="{./Background}"
4-
Height="{./HeightPolicy}" Width="{./WidthPolicy}"
54
MouseEnter="./onBorderMouseEnter"
65
MouseLeave="./onBorderMouseLeave">
7-
<VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Spacing="0">
6+
<VerticalStack Spacing="0">
87
<!-- <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
98
Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">-->
109
<HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
11-
Name="hs" Margin="2" Spacing="0" Width="{./WidthPolicy}" Height="Fit">
10+
Name="hs" Margin="2" Spacing="0" Height="Fit">
1211
<GraphicObject Width="5"/>
1312
<Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
14-
<Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
13+
<Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Title}" />
1514
<Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
1615
MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
1716
<Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
@@ -20,6 +19,6 @@
2019
<GraphicObject Width="5"/>
2120
</HorizontalStack>
2221
<!-- </Border>-->
23-
<Container Name="Content" MinimumSize="50,50" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
22+
<Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
2423
</VerticalStack>
2524
</Border>

Templates/treeList.crow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0"?>
22
<VerticalStack
3-
Height="Fit" Width="{../WidthPolicy}" Name="ItemsContainer"/>
3+
Height="Fit" Name="ItemsContainer"/>

Tests/Interfaces/Container/0.crow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
22
<Container Background="Onyx" Margin="10" Width="90%" Height="90%">
3-
<GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
3+
<GraphicObject Margin="10" Background="Mantis"
44
MinimumSize="50,50"/>
55
</Container>

Tests/Interfaces/TemplatedContainer/testTreeView.crow

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos">
1313
<Expandable Caption="{Name}" >
1414
<Template>
15-
<VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
16-
<HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}"
15+
<VerticalStack>
16+
<HorizontalStack Spacing="1" Height="Fit"
1717
MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
1818
MouseLeave="{Background=Transparent}">
1919
<Image Margin="2" Width="12" Height="12"
@@ -22,17 +22,16 @@
2222
SvgSub="{./IsExpanded}"/>
2323
<Image Margin="2" Width="14" Height="14"
2424
Path="#Crow.Images.Icons.folder.svg"/>
25-
<Label Text="{./Caption}" Width="{./WidthPolicy}"/>
25+
<Label Text="{./Caption}"/>
2626
</HorizontalStack>
27-
<Container Name="Content" Visible="false"
28-
Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
27+
<Container Name="Content" Visible="false"/>
2928
</VerticalStack>
3029
</Template>
31-
<HorizontalStack Height="Fit" Width="{./WidthPolicy}">
30+
<HorizontalStack Height="Fit">
3231
<GraphicObject Width="12" Height="10"/>
33-
<TreeView Name="List" Height="Fit" Width="{./WidthPolicy}">
32+
<TreeView Name="List" Height="Fit">
3433
<Template>
35-
<VerticalStack Height="Fit" Width="{../WidthPolicy}" Name="ItemsContainer"/>
34+
<VerticalStack Height="Fit" Name="ItemsContainer"/>
3635
</Template>
3736
</TreeView>
3837
</HorizontalStack>

0 commit comments

Comments
 (0)