diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-15 11:31:22 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-15 11:31:22 +0200 |
| commit | e349658ad697ef950c85a85faa6259245ad6d266 (patch) | |
| tree | c20834d46cbb881ae15c3bd92326e64d24891e09 | |
| parent | 75bdbe50aff36405a56422783c4ef84f951f4dc6 (diff) | |
debug and typo
| -rwxr-xr-x | Templates/Checkbox.goml | 4 | ||||
| -rw-r--r-- | Tests/GOLIBTests.cs | 2 | ||||
| -rwxr-xr-x | Tests/Interfaces/testBorder.goml | 13 | ||||
| -rwxr-xr-x | Tests/Interfaces/testExpandable.goml | 4 | ||||
| -rwxr-xr-x | Tests/Interfaces/testGroupBox.goml | 14 | ||||
| -rw-r--r-- | Tests/Tests.csproj | 6 | ||||
| -rw-r--r-- | src/GraphicObjects/AnalogMeter.cs | 9 | ||||
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedContainer.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedControl.cs | 4 |
10 files changed, 29 insertions, 35 deletions
diff --git a/Templates/Checkbox.goml b/Templates/Checkbox.goml index 130b0193..44e66817 100755 --- a/Templates/Checkbox.goml +++ b/Templates/Checkbox.goml @@ -1,8 +1,4 @@ <?xml version="1.0"?>
-<!--<HorizontalStack Spacing="1" Height="-1" Width="0">
- <Image Margin="2" Width="14" Height="14" Path="{Image}" SvgSub="{SvgSub2}"/>
- <Label Text="{Caption}" Width="0"/>
-</HorizontalStack>-->
<HorizontalStack Spacing="1" Height="{TemplatedHeight}" Width="{TemplatedWidth}">
<Image Margin="2" Width="14" Height="14" Path="{Image}" SvgSub="{SvgSub}"/>
<Label Text="{Caption}" Height="{TemplatedHeight}" Width="{TemplatedWidth}"/>
diff --git a/Tests/GOLIBTests.cs b/Tests/GOLIBTests.cs index 2585ad6c..a9014d3f 100644 --- a/Tests/GOLIBTests.cs +++ b/Tests/GOLIBTests.cs @@ -31,6 +31,8 @@ namespace test int frameCpt = 0;
int idx = 0;
string[] testFiles = {
+ "testGroupBox.goml",
+ "testBorder.goml",
"testCheckbox.goml",
"testWindow.goml",
"test0.goml",
diff --git a/Tests/Interfaces/testBorder.goml b/Tests/Interfaces/testBorder.goml index 15ecba3a..8a6627b6 100755 --- a/Tests/Interfaces/testBorder.goml +++ b/Tests/Interfaces/testBorder.goml @@ -1,7 +1,8 @@ <?xml version="1.0"?>
-<GroupBox Width="-1" Height="-1" Background="Red">
- <VerticalStack Margin="0">
- <Checkbox />
-
- </VerticalStack>
-</GroupBox>
+<Container Fit="true" Margin="5" Background="Blue">
+<Group Fit="true" Margin="5" Background="Green">
+<Border Fit="true" Background="Red" Margin="10">
+ <Checkbox/>
+</Border>
+</Group>
+</Container>
diff --git a/Tests/Interfaces/testExpandable.goml b/Tests/Interfaces/testExpandable.goml index 712a485f..1627055b 100755 --- a/Tests/Interfaces/testExpandable.goml +++ b/Tests/Interfaces/testExpandable.goml @@ -1,6 +1,6 @@ <?xml version="1.0"?>
-<Expandable Title="Test expandable" Width="150" Background="DimGray">
- <VerticalStack Width="100" Height="-1">
+<Expandable Title="Test expandable" Width="-1" Background="DimGray">
+ <VerticalStack Width="-1" Height="-1">
<Checkbox Name="chk1"/>
<Checkbox Name="chk2" IsChecked="true"/>
<Checkbox Name="chk3"/>
diff --git a/Tests/Interfaces/testGroupBox.goml b/Tests/Interfaces/testGroupBox.goml index 712a485f..fd328be4 100755 --- a/Tests/Interfaces/testGroupBox.goml +++ b/Tests/Interfaces/testGroupBox.goml @@ -1,9 +1,7 @@ <?xml version="1.0"?>
-<Expandable Title="Test expandable" Width="150" Background="DimGray">
- <VerticalStack Width="100" Height="-1">
- <Checkbox Name="chk1"/>
- <Checkbox Name="chk2" IsChecked="true"/>
- <Checkbox Name="chk3"/>
- <Checkbox Name="chk4"/>
- </VerticalStack>
-</Expandable>
+<Groupbox Width="-1" Height="-1" Background="Red">
+ <VerticalStack Margin="0">
+ <Checkbox />
+
+ </VerticalStack>
+</Groupbox>
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index bf926a16..ce5f48b7 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -159,6 +159,12 @@ <None Include="Interfaces\testWindow2.goml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="Interfaces\testGroupBox.goml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Interfaces\testBorder.goml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> </ItemGroup> <ItemGroup> <Folder Include="Interfaces\" /> diff --git a/src/GraphicObjects/AnalogMeter.cs b/src/GraphicObjects/AnalogMeter.cs index bf7f1c24..1be24c4f 100644 --- a/src/GraphicObjects/AnalogMeter.cs +++ b/src/GraphicObjects/AnalogMeter.cs @@ -17,15 +17,6 @@ namespace go } #endregion - #region implemented abstract members of TemplatedControl - - protected override void loadTemplate (GraphicObject template = null) - { - base.loadTemplate (template); - } - - #endregion - #region GraphicObject Overrides protected override void onDraw (Context gr) { diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 6a146c64..41720ed9 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -480,6 +480,8 @@ namespace go {
if (Parent==null)
return;
+
+ //Debug.WriteLine ("Layout change: " + this.ToString () + ":" + LastSlots.ToString() + "=>" + Slot.ToString ());
switch (layoutType) {
case LayoutingType.Width:
@@ -644,7 +646,7 @@ namespace go using (ImageSurface draw =
new ImageSurface(bmp, Format.Argb32, Slot.Width, Slot.Height, stride)) {
using (Context gr = new Context (draw)) {
- gr.Antialias = Antialias.Gray;
+ gr.Antialias = Antialias.Subpixel;
onDraw (gr);
}
draw.Flush ();
diff --git a/src/GraphicObjects/TemplatedContainer.cs b/src/GraphicObjects/TemplatedContainer.cs index 4d8eb832..a19f6c28 100644 --- a/src/GraphicObjects/TemplatedContainer.cs +++ b/src/GraphicObjects/TemplatedContainer.cs @@ -26,13 +26,13 @@ namespace go { public abstract class TemplatedContainer : TemplatedControl { - [XmlIgnore] - public abstract GraphicObject Content{ get; set;} + [XmlIgnore]public abstract GraphicObject Content{ get; set;} protected override void loadTemplate (GraphicObject template) { base.loadTemplate (template); } + public TemplatedContainer () : base() { } diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index ca3ed68c..87bbeb09 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -108,9 +108,7 @@ namespace go }else this.SetChild (template); } - - - + #region IXmlSerializable public override System.Xml.Schema.XmlSchema GetSchema(){ return null; } |