Browse Source

add alpha slider

Equbuxu 4 years ago
parent
commit
60ff77efd1

+ 1 - 1
PixiEditor/PixiEditor.csproj

@@ -67,7 +67,7 @@
     <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
     <PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
     <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
-    <PackageReference Include="PixiEditor.ColorPicker" Version="3.0.0" />
+    <PackageReference Include="PixiEditor.ColorPicker" Version="3.1.0" />
     <PackageReference Include="PixiEditor.Parser" Version="1.0.1.1" />
     <PackageReference Include="WriteableBitmapEx">
       <Version>1.6.7</Version>

+ 1 - 2
PixiEditor/Views/ColorPanelController.cs

@@ -1,5 +1,4 @@
 using AvalonDock.Layout;
-using System.Windows;
 
 namespace PixiEditor.Views
 {
@@ -18,7 +17,7 @@ namespace PixiEditor.Views
 
         public void DeterminePanelsToDisplay()
         {
-            if (SystemParameters.PrimaryScreenHeight < 1010)
+            if (/*SystemParameters.PrimaryScreenHeight < 1010*/true)
             {
                 colorPickerPanel.IsVisible = false;
                 colorSlidersPanel.IsVisible = true;

+ 6 - 3
PixiEditor/Views/UserControls/SmallColorPicker.xaml

@@ -29,9 +29,9 @@
             <RowDefinition Height="8*"/>
             <RowDefinition Height="2*"/>
             <RowDefinition Height="1.2*"/>
-            <RowDefinition Height="20"/>
+            <RowDefinition Height="25"/>
         </Grid.RowDefinitions>
-        <colorpicker:SquarePicker Grid.ColumnSpan="2" Grid.RowSpan="2"
+        <colorpicker:SquarePicker Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="3"
                                   ColorState="{Binding ColorState, Mode=TwoWay, ElementName=uc}"
                                   PickerType="{Binding ElementName=colorSpaceComboBox, Path=SelectedIndex, Converter={StaticResource IntToPickerTypeConverter}}"/>
         <colorpicker:ColorDisplay Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3,0,0,0"
@@ -45,6 +45,9 @@
         <colorpicker:HexColorTextBox Grid.Row="1" Grid.RowSpan="2" Grid.Column="2" Margin="0,0,3,0"
                                      HorizontalAlignment="Right" VerticalAlignment="Bottom" 
                                      ColorState="{Binding ColorState, Mode=TwoWay, ElementName=uc}"/>
-        <Slider Grid.Row="3" Grid.ColumnSpan="2"/>
+        <DockPanel Grid.Row="3" Grid.ColumnSpan="2">
+            <Label Margin="5,0" VerticalAlignment="Center">Alpha:</Label>
+            <colorpicker:AlphaSlider Margin="5,0" VerticalAlignment="Center" ColorState="{Binding ColorState, Mode=TwoWay, ElementName=uc}"/>
+        </DockPanel>
     </Grid>
 </colorpicker:DualPickerControlBase>