|
@@ -9,9 +9,10 @@
|
|
|
xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters" xmlns:helpers="clr-namespace:PixiEditor.Helpers.UI"
|
|
|
xmlns:userControls1="clr-namespace:PixiEditor.Views.UserControls"
|
|
|
xmlns:cmds="clr-namespace:PixiEditor.Models.Commands.XAML"
|
|
|
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
|
mc:Ignorable="d"
|
|
|
Focusable="True"
|
|
|
- d:DesignHeight="60"
|
|
|
+ d:DesignHeight="35"
|
|
|
d:DesignWidth="250"
|
|
|
x:Name="folderControl"
|
|
|
DragEnter="FolderControl_DragEnter"
|
|
@@ -45,7 +46,7 @@
|
|
|
<Grid Visibility="Collapsed" x:Name="middleDropGrid" Grid.Row="1" AllowDrop="True" Panel.ZIndex="2" Background="Transparent" DragEnter="Grid_CenterEnter" Drop="Grid_Drop_Center" DragLeave="Grid_CenterLeave"></Grid>
|
|
|
<Grid x:Name="centerGrid" Grid.Row="0" Grid.RowSpan="3" Background="Transparent">
|
|
|
<Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="30"/>
|
|
|
+ <ColumnDefinition Width="24"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<CheckBox Style="{StaticResource ImageCheckBox}" VerticalAlignment="Center"
|
|
@@ -54,10 +55,11 @@
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left">
|
|
|
<Rectangle Width="{Binding Path=(helpers:TreeViewItemHelper.Indent).Value, Mode=OneWay, RelativeSource={RelativeSource AncestorType=ItemsPresenter}}" Fill="Transparent" StrokeThickness="0"/>
|
|
|
-
|
|
|
+ <Border
|
|
|
+ Visibility="{Binding Folder.ClipToMemberBelowEnabledBindable, ElementName=folderControl, Converter={converters:BoolToVisibilityConverter}}"
|
|
|
+ Background="{StaticResource PixiRed}" Width="3" Margin="1,1,2,1" CornerRadius="1"/>
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Grid.Column="0" HorizontalAlignment="Left">
|
|
|
- <Border Width="30" Height="30" BorderThickness="1" BorderBrush="Black" Background="{StaticResource MainColor}"
|
|
|
- Margin="5, 0, 10, 0">
|
|
|
+ <Border Width="30" Height="30" BorderThickness="1" BorderBrush="Black" Background="{StaticResource MainColor}">
|
|
|
<Image Source="{Binding Folder.PreviewBitmap, ElementName=folderControl}" Stretch="Uniform" Width="20" Height="20">
|
|
|
<RenderOptions.BitmapScalingMode>
|
|
|
<MultiBinding Converter="{converters:WidthToBitmapScalingModeConverter}">
|
|
@@ -67,11 +69,47 @@
|
|
|
</RenderOptions.BitmapScalingMode>
|
|
|
</Image>
|
|
|
</Border>
|
|
|
- <userControls1:EditableTextBlock
|
|
|
+ <Border
|
|
|
+ Width="30" Height="30"
|
|
|
+ BorderThickness="1"
|
|
|
+ Background="{StaticResource MainColor}"
|
|
|
+ Margin="3,0,0,0"
|
|
|
+ Visibility="{Binding Folder.HasMaskBindable, ElementName=folderControl, Converter={converters:BoolToVisibilityConverter}}"
|
|
|
+ BorderBrush="White">
|
|
|
+ <Grid IsHitTestVisible="False">
|
|
|
+ <Image Source="{Binding Folder.MaskPreviewBitmap,ElementName=folderControl}" Stretch="Uniform" Width="20" Height="20"
|
|
|
+ RenderOptions.BitmapScalingMode="NearestNeighbor" IsHitTestVisible="False"/>
|
|
|
+ <Path
|
|
|
+ Data="M 2 0 L 10 8 L 18 0 L 20 2 L 12 10 L 20 18 L 18 20 L 10 12 L 2 20 L 0 18 L 8 10 L 0 2 Z"
|
|
|
+ Fill="{StaticResource PixiRed}" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
+ Visibility="{Binding Folder.MaskIsVisibleBindable, ElementName=folderControl, Converter={InverseBoolToVisibilityConverter}}"/>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ <StackPanel Orientation="Vertical" Margin="3,0,5,0">
|
|
|
+ <StackPanel Orientation="Horizontal">
|
|
|
+ <TextBlock d:Text="100" Foreground="White">
|
|
|
+ <TextBlock.Text>
|
|
|
+ <Binding ElementName="folderControl" Path="Folder.OpacityBindable" Converter="{converters:MultiplyConverter}" StringFormat="N0">
|
|
|
+ <Binding.ConverterParameter>
|
|
|
+ <sys:Double>100.0</sys:Double>
|
|
|
+ </Binding.ConverterParameter>
|
|
|
+ </Binding>
|
|
|
+ </TextBlock.Text>
|
|
|
+ </TextBlock>
|
|
|
+ <TextBlock Foreground="White">%</TextBlock>
|
|
|
+ <TextBlock
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ d:Text="Normal"
|
|
|
+ Foreground="White"
|
|
|
+ Text="{Binding Folder.BlendModeBindable, ElementName=folderControl, Converter={converters:BlendModeToStringConverter}}"/>
|
|
|
+ </StackPanel>
|
|
|
+ <userControls1:EditableTextBlock
|
|
|
x:Name="editableTextBlock"
|
|
|
- FontSize="15"
|
|
|
+ d:Text="New Folder"
|
|
|
+ FontSize="12"
|
|
|
VerticalAlignment="Center"
|
|
|
Text="{Binding Folder.NameBindable, ElementName=folderControl, Mode=TwoWay}" />
|
|
|
+ </StackPanel>
|
|
|
</StackPanel>
|
|
|
<Image Source="/Images/Folder.png" Height="20" Margin="0,0,10,0" HorizontalAlignment="Right"/>
|
|
|
</StackPanel>
|
|
@@ -83,8 +121,22 @@
|
|
|
</Grid>
|
|
|
<Border.ContextMenu>
|
|
|
<ContextMenu>
|
|
|
- <MenuItem Header="Rename" Click="RenameMenuItem_Click"/>
|
|
|
<MenuItem Header="Delete" Command="{cmds:Command PixiEditor.Layer.DeleteAllSelected}"/>
|
|
|
+ <MenuItem Header="Rename" Click="RenameMenuItem_Click"/>
|
|
|
+ <MenuItem Header="Move upwards" Command="{cmds:Command PixiEditor.Layer.MoveSelectedMemberUpwards}"/>
|
|
|
+ <MenuItem Header="Move downwards" Command="{cmds:Command PixiEditor.Layer.MoveSelectedMemberDownwards}"/>
|
|
|
+ <Separator/>
|
|
|
+ <MenuItem Header="Clip to layer below" Command="{cmds:Command PixiEditor.Layer.EnableClipToMemberBelow}"/>
|
|
|
+ <MenuItem Header="Disable clip to layer below" Command="{cmds:Command PixiEditor.Layer.DisableClipToMemberBelow}"/>
|
|
|
+ <Separator/>
|
|
|
+ <MenuItem Header="Create mask" Command="{cmds:Command PixiEditor.Layer.CreateMask}"/>
|
|
|
+ <MenuItem Header="Delete mask" Command="{cmds:Command PixiEditor.Layer.DeleteMask}"/>
|
|
|
+ <MenuItem Header="Enable mask" Command="{cmds:Command PixiEditor.Layer.EnableMask}"/>
|
|
|
+ <MenuItem Header="Disable mask" Command="{cmds:Command PixiEditor.Layer.DisableMask}"/>
|
|
|
+ <Separator/>
|
|
|
+ <MenuItem Header="Merge selected" Command="{cmds:Command PixiEditor.Layer.MergeSelected}"/>
|
|
|
+ <MenuItem Header="Merge with above" Command="{cmds:Command PixiEditor.Layer.MergeWithAbove}"/>
|
|
|
+ <MenuItem Header="Merge with below" Command="{cmds:Command PixiEditor.Layer.MergeWithBelow}"/>
|
|
|
</ContextMenu>
|
|
|
</Border.ContextMenu>
|
|
|
</Border>
|