diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-24 01:54:22 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-24 01:54:22 +0100 |
| commit | af3dc048f37ef4340feebbfb0a9b612ae99b559b (patch) | |
| tree | 3ecd623fc858acf33f8720a14ffc12939b69d3e1 /Templates | |
| parent | f987a58bfb6df496a4ca82f6425d27a421269e8b (diff) | |
maximize and minimize for window
Diffstat (limited to 'Templates')
| -rwxr-xr-x | Templates/ToolWindow.template | 24 | ||||
| -rwxr-xr-x | Templates/Window.template | 23 |
2 files changed, 43 insertions, 4 deletions
diff --git a/Templates/ToolWindow.template b/Templates/ToolWindow.template new file mode 100755 index 00000000..7325193c --- /dev/null +++ b/Templates/ToolWindow.template @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}" + Background="{./Background}" + MouseEnter="./onBorderMouseEnter" + MouseLeave="./onBorderMouseLeave"> + <VerticalStack Spacing="0"> +<!-- <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit" + Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">--> + <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9" + Name="hs" Margin="2" Spacing="0" Height="Fit"> + <GraphicObject Width="5"/> + <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> + <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Title}" /> + <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg" + MouseClick="./butQuitPress"/> + </Border> + <GraphicObject Width="5"/> + </HorizontalStack> +<!-- </Border>--> + <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/> + </VerticalStack> +</Border> diff --git a/Templates/Window.template b/Templates/Window.template index 7325193c..d729021c 100755 --- a/Templates/Window.template +++ b/Templates/Window.template @@ -10,15 +10,30 @@ Name="hs" Margin="2" Spacing="0" Height="Fit"> <GraphicObject Width="5"/> <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> - <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Title}" /> - <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + <Label Width="Stretched" Foreground="White" Margin="2" TextAlignment="Center" Text="{./Title}" /> + <Border Visible="{./ShowMinimize}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> - <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg" + <Image Focusable="true" Path="#Crow.Images.Icons.minimize.svg" + MouseClick="./onMinimized"/> + </Border> + <Border Visible="{./ShowNormal}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Path="#Crow.Images.Icons.normalize.svg" + MouseClick="./onUnmaximized"/> + </Border> + <Border Visible="{./ShowMaximize}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Path="#Crow.Images.Icons.maximize.svg" + MouseClick="./onMaximized"/> + </Border> + <Border BorderWidth="1" Foreground="Transparent" Height="14" Width="14" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Path="#Crow.Images.Icons.exit2.svg" MouseClick="./butQuitPress"/> </Border> <GraphicObject Width="5"/> </HorizontalStack> <!-- </Border>--> - <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/> + <Container Name="Content" MinimumSize="0,0" Background="0.5,0.5,0.5,0.5"/> </VerticalStack> </Border> |