]> O.S.I.I.S - jp/crow.git/commitdiff
* Window.goml:
authorjpbruyere <jp.bruyere@hotmail.com>
Thu, 10 Sep 2015 08:07:33 +0000 (10:07 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Thu, 10 Sep 2015 08:07:33 +0000 (10:07 +0200)
* Window.cs: default window

Templates/Window.goml
src/GraphicObjects/Window.cs

index 2ec2598774f3bcb10f3da44d5350432e98bae96f..cf72c6bf11a4c81840e845aadfc80de7b49f77b0 100755 (executable)
@@ -1,12 +1,17 @@
 <?xml version="1.0"?>\r
-<Border BorderWidth="1" BorderColor="LightGray" Margin="0">\r
+<Border BorderWidth="1" BorderColor="White" Margin="0" CornerRadius="20">\r
        <VerticalStack Height="0" Width="0" Margin="0">\r
-               <Border BorderWidth="1" BorderColor="LightGray"  Height="-1" Width="0" Background="BlueCrayola">\r
+               <Border BorderWidth="1" BorderColor="White"  Height="-1" Width="0" Background="0,1;0,5;1,0;0,5">\r
                        <HorizontalStack Name="hs" Margin="1" Spacing="1" Height="-1" Width="0" Focusable="false" >\r
+                               <GraphicObject Width="5" Height="0"/>\r
                                <Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>\r
-                               <Label Width="0" Name="Title" Margin="1" />\r
-                               <Image Focusable="true" Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.exit.svg"\r
-                                       MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}" MouseClick="butQuitPress"/>\r
+                               <Label Foreground="White" Width="0" Name="Title" Margin="1" TextAlignment="Center" />\r
+                               <Border CornerRadius="6" BorderWidth="1" Margin="0" BorderColor="Transparent"  Height="12" Width="12"\r
+                                       MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">\r
+                                       <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"\r
+                                                MouseClick="butQuitPress"/>\r
+                               </Border>\r
+                               <GraphicObject Width="5" Height="0"/>\r
                        </HorizontalStack>\r
                </Border>\r
                <Container Name="Content" Margin="0" Width="0" Height="0"/>\r
index 0c275f7a86c4d43648742bda63fbdefee2502481..09488499e53cfb5aa8c2ddaf65e9a0ad97daf698 100644 (file)
@@ -176,7 +176,10 @@ namespace go
 
                void butQuitPress (object sender, MouseButtonEventArgs e)
                {
-                       TopContainer.DeleteWidget (this);
+                       ILayoutable parent = (sender as GraphicObject).Parent;
+                       while(!(parent is Window))
+                               parent = parent.Parent;
+                       TopContainer.DeleteWidget (parent as GraphicObject);
                }