diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-14 00:38:19 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-14 00:38:19 +0200 |
| commit | a5006f5335e3d16667f01ac6ec27ddcac439b5d7 (patch) | |
| tree | 9b6d4fd03d5bde89d6e1f9e6d7950f3c1e2f3fde | |
| parent | b76c6bf6ded447932634dd97024c1e423aa35e4b (diff) | |
* Spinner.goml, Window.cs:
debug
* GraphicObject.cs:
allow min and max size overriding
* ListBox.cs:
refresh list when children are cleared
| -rw-r--r-- | Images/Icons/iconInfo.svg | 24 | ||||
| -rw-r--r-- | Templates/MessageBox.goml | 1 | ||||
| -rwxr-xr-x | Templates/Spinner.goml | 2 | ||||
| -rwxr-xr-x | Tests/Interfaces/test6.goml | 18 | ||||
| -rwxr-xr-x | Tests/Interfaces/testMsgBox.goml | 18 | ||||
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/ListBox.cs | 1 | ||||
| -rw-r--r-- | src/GraphicObjects/MessageBox.cs | 32 | ||||
| -rw-r--r-- | src/GraphicObjects/Window.cs | 2 |
9 files changed, 98 insertions, 4 deletions
diff --git a/Images/Icons/iconInfo.svg b/Images/Icons/iconInfo.svg new file mode 100644 index 00000000..f09168a7 --- /dev/null +++ b/Images/Icons/iconInfo.svg @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 62 62" width="620" height="620" version="1.0"> + <defs> + <linearGradient id="fieldGradient" gradientUnits="userSpaceOnUse" x1="42.9863" y1="7.01270" x2="22.0144" y2="51.9871"> + <stop offset="0.0" stop-color="#BCD6FE"/> + <stop offset="1.0" stop-color="#6787D3"/> + </linearGradient> + <linearGradient id="edgeGradient" gradientUnits="userSpaceOnUse" x1="55.4541" y1="42.7529" x2="9.54710" y2="16.2485"> + <stop offset="0.0" stop-color="#3057A7"/> + <stop offset="1.0" stop-color="#5A7AC6"/> + </linearGradient> + <radialGradient id="shadowGradient"> + <stop offset="0.0" stop-color="#C0C0C0"/> + <stop offset="0.88" stop-color="#C0C0C0"/> + <stop offset="1.0" stop-color="#C0C0C0" stop-opacity="0.0"/> + </radialGradient> + </defs> + <circle id="shadow" r="26.5" cy="29.5" cx="32.5" fill="url(#shadowGradient)" transform="matrix(1.0648,0.0,0.0,1.064822,-2.1,1.0864)"/> + <circle id="field" r="25.8" cx="31" cy="31" fill="url(#fieldGradient)" stroke="url(#edgeGradient)" stroke-width="2"/> + <g id="info" fill="white"> + <polygon points="23,25 35,25 35,44 39,44 39,48 23,48 23,44 27,44 27,28 23,28 23,25"/> + <circle r="4" cx="31" cy="17"/> + </g> +</svg>
\ No newline at end of file diff --git a/Templates/MessageBox.goml b/Templates/MessageBox.goml new file mode 100644 index 00000000..e02abfc9 --- /dev/null +++ b/Templates/MessageBox.goml @@ -0,0 +1 @@ + diff --git a/Templates/Spinner.goml b/Templates/Spinner.goml index 70b459b2..59897fe3 100755 --- a/Templates/Spinner.goml +++ b/Templates/Spinner.goml @@ -3,7 +3,7 @@ <HorizontalStack Name="hstack" Margin="0" Spacing="2" Width="{Width}" Height="{Height}"> <Label Foreground="DimGray" Width="0" Height="{Height}" Name="labCpt" Text="{Value}" Margin="1" TextAlignment="RightCenter"/> - <VerticalStack RowCount="2" Width="-1" Height="-1" Spacing="1" > + <VerticalStack Width="-1" Height="-1" Spacing="1" > <Button Width="12" Height="8" MouseClick="onUp"> <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/> </Button> diff --git a/Tests/Interfaces/test6.goml b/Tests/Interfaces/test6.goml new file mode 100755 index 00000000..b3b629b9 --- /dev/null +++ b/Tests/Interfaces/test6.goml @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<!--<GraphicObject + Width="100" Height="100" + Top="200" Left="200" + Margin="10" Background="Green"/>--> +<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue"> + <HorizontalStack Name="hstack" Margin="0" Spacing="5"> + <Label Name="labCpt" Text="55"/> + <VerticalStack Spacing="1" Name="vstack"> + <Button Width="10" Height="8" MouseClick="onUp"> + <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/> + </Button> + <Button Width="10" Height="8" MouseClick="onDown"> + <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/> + </Button> + </VerticalStack> + </HorizontalStack> +</Border>
\ No newline at end of file diff --git a/Tests/Interfaces/testMsgBox.goml b/Tests/Interfaces/testMsgBox.goml new file mode 100755 index 00000000..b3b629b9 --- /dev/null +++ b/Tests/Interfaces/testMsgBox.goml @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<!--<GraphicObject + Width="100" Height="100" + Top="200" Left="200" + Margin="10" Background="Green"/>--> +<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue"> + <HorizontalStack Name="hstack" Margin="0" Spacing="5"> + <Label Name="labCpt" Text="55"/> + <VerticalStack Spacing="1" Name="vstack"> + <Button Width="10" Height="8" MouseClick="onUp"> + <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/> + </Button> + <Button Width="10" Height="8" MouseClick="onDown"> + <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/> + </Button> + </VerticalStack> + </HorizontalStack> +</Border>
\ No newline at end of file diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 98b52b0d..f8ffb511 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -295,12 +295,12 @@ namespace go }
}
[XmlAttributeAttribute()][DefaultValue("0;0")]
- public Size MaximumSize {
+ public virtual Size MaximumSize {
get { return _maximumSize; }
set { _maximumSize = value; }
}
[XmlAttributeAttribute()][DefaultValue("0;0")]
- public Size MinimumSize {
+ public virtual Size MinimumSize {
get { return _minimumSize; }
set { _minimumSize = value; }
}
diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs index ea7f9ec5..6267ca92 100644 --- a/src/GraphicObjects/ListBox.cs +++ b/src/GraphicObjects/ListBox.cs @@ -72,6 +72,7 @@ namespace go data = value; _list.Children.Clear (); + _list.registerForGraphicUpdate (); if (data == null) return; diff --git a/src/GraphicObjects/MessageBox.cs b/src/GraphicObjects/MessageBox.cs new file mode 100644 index 00000000..a5ce6910 --- /dev/null +++ b/src/GraphicObjects/MessageBox.cs @@ -0,0 +1,32 @@ +// +// MessageBox.cs +// +// Author: +// Jean-Philippe Bruyère <jp.bruyere@hotmail.com> +// +// Copyright (c) 2015 jp +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +using System; + +namespace go +{ + public class MessageBox + { + public MessageBox () + { + } + } +} + diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs index 09488499..8355ff15 100644 --- a/src/GraphicObjects/Window.cs +++ b/src/GraphicObjects/Window.cs @@ -174,7 +174,7 @@ namespace go _icon = this.child.FindByName ("Icon") as Image; } - void butQuitPress (object sender, MouseButtonEventArgs e) + protected void butQuitPress (object sender, MouseButtonEventArgs e) { ILayoutable parent = (sender as GraphicObject).Parent; while(!(parent is Window)) |