Browse Source

Merge pull request #142 from PixiEditor/swatches-ui

Made swatches rounded shadowed rectangles and thin layer borders
Krzysztof Krysiński 4 years ago
parent
commit
8575321983
2 changed files with 5 additions and 5 deletions
  1. 4 4
      PixiEditor/Views/MainWindow.xaml
  2. 1 1
      PixiEditor/Views/UserControls/LayerItem.xaml

+ 4 - 4
PixiEditor/Views/MainWindow.xaml

@@ -244,14 +244,14 @@
                                     <ItemsControl ItemsSource="{Binding BitmapManager.ActiveDocument.Swatches}">
                                         <ItemsControl.ItemsPanel>
                                             <ItemsPanelTemplate>
-                                                <WrapPanel Margin="10,0,0,0" Orientation="Horizontal"
+                                                <WrapPanel Margin="10,10,0,10" Orientation="Horizontal"
                                                            VerticalAlignment="Top" HorizontalAlignment="Left" />
                                             </ItemsPanelTemplate>
                                         </ItemsControl.ItemsPanel>
                                         <ItemsControl.ItemTemplate>
                                             <DataTemplate>
-                                                <Grid Width="50" Height="50" Margin="2">
-                                                    <Border Width="48" Height="48">
+                                                <Grid Width="45" Height="45" Margin="0 5 5 5">
+                                                    <Border CornerRadius="5.5" Width="44" Height="44">
                                                         <Border.Background>
                                                             <ImageBrush ImageSource="../Images/transparentbg.png"
                                                                         Stretch="UniformToFill">
@@ -262,7 +262,7 @@
                                                             </ImageBrush>
                                                         </Border.Background>
                                                     </Border>
-                                                    <Border BorderThickness="0.25" Cursor="Hand" BorderBrush="White">
+                                                    <Border CornerRadius="5.5" BorderThickness="0 0 0 0.1" BorderBrush="White" Cursor="Hand">
                                                         <Border.Background>
                                                             <SolidColorBrush Color="{Binding}" />
                                                         </Border.Background>

+ 1 - 1
PixiEditor/Views/UserControls/LayerItem.xaml

@@ -11,7 +11,7 @@
     <UserControl.Resources>
         <converters:BoolToColorConverter x:Key="BoolToColorConverter" />
     </UserControl.Resources>
-    <Border BorderThickness="1" BorderBrush="Gray" MinWidth="60"
+    <Border BorderThickness="0 0 0 0.5" BorderBrush="Gray" MinWidth="60"
             Background="{Binding IsActive, Mode=TwoWay, Converter={StaticResource BoolToColorConverter}}">
         <i:Interaction.Triggers>
             <i:EventTrigger EventName="MouseDown">