Browse Source

Folder control fixed

Krzysztof Krysiński 1 year ago
parent
commit
ada47dbe1d

+ 1 - 1
src/PixiEditor.AvaloniaUI/Views/Layers/FolderControl.axaml

@@ -84,7 +84,7 @@
                                     RenderOptions.BitmapInterpolationMode="None" 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"
+                                Fill="{DynamicResource ThemeAccentBrush}" HorizontalAlignment="Center" VerticalAlignment="Center"
                                 IsVisible="{Binding !Folder.MaskIsVisibleBindable, ElementName=folderControl}"/>
                             </Grid>
                         </Border>

+ 6 - 5
src/PixiEditor.AvaloniaUI/Views/Layers/LayersManager.axaml

@@ -161,22 +161,23 @@
                 <TreeView.Resources>
                     <!--<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
                     <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />-->
-                    <TreeDataTemplate x:Key="TreeDataTemplate" DataType="{x:Type docVm:FolderViewModel}" ItemsSource="{Binding Children}">
+
+                </TreeView.Resources>
+                <TreeView.DataTemplates>
+                    <TreeDataTemplate DataType="docVm:FolderViewModel" ItemsSource="{Binding Children}">
                         <layers:FolderControl
                             Folder="{Binding}"
                             Manager="{Binding ElementName=layersManager}"
                             PointerPressed="FolderControl_MouseDown"
                             PointerReleased="FolderControl_MouseUp"/>
                     </TreeDataTemplate>
-                </TreeView.Resources>
-                <TreeView.DataTemplates>
-                    <DataTemplate DataType="{x:Type docVm:LayerViewModel}">
+                    <TreeDataTemplate DataType="{x:Type docVm:LayerViewModel}">
                         <layers:LayerControl
                             Layer="{Binding}"
                             Manager="{Binding ElementName=layersManager}"
                             PointerPressed="LayerControl_MouseDown"
                             PointerReleased="LayerControl_MouseUp"/>
-                    </DataTemplate>
+                    </TreeDataTemplate>
                 </TreeView.DataTemplates>
             </TreeView>
             <Border Name="dropBorder" DragDrop.AllowDrop="True" Background="Transparent" BorderThickness="0, 5, 0, 0"></Border>