Bläddra i källkod

Some layer related styles

Krzysztof Krysiński 2 år sedan
förälder
incheckning
1633d8fc73

+ 12 - 1
src/PixiEditor.AvaloniaUI/Styles/PortingWipStyles.axaml

@@ -35,7 +35,18 @@
     </Style>
 
     <Style Selector="CheckBox.ImageCheckBox">
-
+        <Setter Property="Template">
+                <ControlTemplate TargetType="{x:Type CheckBox}">
+                    <StackPanel Orientation="Horizontal">
+                        <Image Cursor="Hand" x:Name="checkboxImage" Source="../Images/Eye-off.png"/>
+                        <ContentPresenter/>
+                    </StackPanel>
+            </ControlTemplate>
+        </Setter>
+    </Style>
+
+    <Style Selector="CheckBox.ImageCheckBox:checked Image">
+        <Setter Property="Source" Value="../Images/Eye.png"/>
     </Style>
 
     <Style Selector="ToggleButton.ExpandCollapseToggleStyle">

+ 2 - 2
src/PixiEditor.AvaloniaUI/Views/Layers/LayersManager.axaml

@@ -27,7 +27,7 @@
             <RowDefinition Height="15"/>
             <RowDefinition Height="1*"/>
         </Grid.RowDefinitions>
-        <StackPanel Grid.Row="0" HorizontalAlignment="Stretch" Background="{DynamicResource ThemeBackgroundBrush}">
+        <StackPanel Grid.Row="0" HorizontalAlignment="Stretch" Background="{DynamicResource ThemeBackgroundColor1}">
             <DockPanel HorizontalAlignment="Stretch" Margin="3,5,3,3">
                 <Button 
                     Command="{xaml:Command PixiEditor.Layer.NewLayer}"
@@ -100,7 +100,7 @@
                 <input:BlendModeComboBox
                     DockPanel.Dock="Left"
                     Margin="0,0,5,0"
-                    Width="120"
+                    Width="80"
                     SelectedBlendMode="{Binding DataContext.ActiveDocument.SelectedStructureMember.BlendModeBindable, Mode=TwoWay, ElementName=layersManager}">
                 </input:BlendModeComboBox>
                 <input:NumberInput

+ 2 - 1
src/PixiEditor.UI.Common/Accents/Base.axaml

@@ -29,6 +29,7 @@
 
             <Color x:Key="GlyphColor">#444</Color>
             <Color x:Key="GlyphBackground">White</Color>
+            <Color x:Key="ThumbColor">#606060</Color>
 
             <Color x:Key="NotificationCardBackgroundColor">#303030</Color>
 
@@ -58,7 +59,7 @@
 
             <SolidColorBrush x:Key="ErrorBrush" Color="{StaticResource ErrorColor}" />
             <SolidColorBrush x:Key="GlyphBrush" Color="{StaticResource GlyphColor}"/>
-
+            <SolidColorBrush x:Key="ThumbBrush" Color="{StaticResource ThumbColor}"/>
 
             <CornerRadius x:Key="ControlCornerRadius">5</CornerRadius>
             <system:Double x:Key="ControlCornerRadiusValue">5</system:Double>

+ 1 - 1
src/PixiEditor.UI.Common/Controls/ComboBox.axaml

@@ -2,7 +2,7 @@
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <ControlTheme x:Key="{x:Type ComboBox}"
                 TargetType="ComboBox">
-    <Setter Property="Background" Value="Transparent" />
+    <Setter Property="Background" Value="{DynamicResource ThemeControlLowBrush}" />
     <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
     <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}" />
     <Setter Property="BorderThickness" Value="{DynamicResource ThemeBorderThickness}" />

+ 17 - 31
src/PixiEditor.UI.Common/Controls/Slider.axaml

@@ -1,15 +1,15 @@
 <ResourceDictionary xmlns="https://github.com/avaloniaui"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-  <ControlTheme x:Key="SliderRepeatTrackTheme"
-                TargetType="RepeatButton">
-    <Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush1}" />
-    <Setter Property="Focusable" Value="False" />
-    <Setter Property="Foreground" Value="{DynamicResource ThemeBorderLowBrush}" />
-    <Setter Property="Template">
-      <ControlTemplate>
-        <Border Background="{TemplateBinding Background}"/>
-      </ControlTemplate>
-    </Setter>
+
+    <ControlTheme x:Key="SliderRepeatTrackTheme"
+                  TargetType="RepeatButton">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="RepeatButton">
+                    <Border Background="Transparent" ></Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
   </ControlTheme>
 
   <ControlTheme x:Key="{x:Type Slider}"
@@ -21,17 +21,11 @@
       <Setter Property="Template">
         <ControlTemplate>
             <Grid Name="grid">
-            <Grid.RowDefinitions>
-              <RowDefinition Height="Auto" />
-              <RowDefinition Height="Auto"
-                             MinHeight="20" />
-              <RowDefinition Height="Auto" />
-            </Grid.RowDefinitions>
-            <Border Name="TrackBackground"
-                    Grid.Row="1"
-                    Height="4"
-                    Margin="6,0"
-                    VerticalAlignment="Center" />
+                <Border Margin="6, 0" CornerRadius="4" Background="{DynamicResource ThemeControlLowBrush}" Height="6"
+                        VerticalAlignment="Center"></Border>
+                <Canvas Margin="-6,-1">
+                    <Rectangle IsVisible="false" x:Name="PART_SelectionRange" Height="4.0" StrokeThickness="1.0"/>
+                </Canvas>
             <Track Name="PART_Track"
                    Grid.Row="1"
                    IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
@@ -49,11 +43,7 @@
                      MinHeight="20">
                 <Thumb.Template>
                   <ControlTemplate>
-                    <Grid Background="{DynamicResource ThemeBackgroundBrush1}">
-                      <Ellipse Width="12"
-                               Height="12"
-                               Fill="{DynamicResource ThemeAccentBrush}" />
-                    </Grid>
+                      <Border Background="{DynamicResource ThumbBrush}" Width="8" Height="18" CornerRadius="4"/>
                   </ControlTemplate>
                 </Thumb.Template>
               </Thumb>
@@ -98,11 +88,7 @@
                      MinHeight="20">
                 <Thumb.Template>
                   <ControlTemplate>
-                    <Grid>
-                      <Ellipse Width="12"
-                               Height="12"
-                               Fill="{DynamicResource ThemeAccentBrush}" />
-                    </Grid>
+                      <Border Background="{DynamicResource ThumbBrush}" Width="18" Height="8" CornerRadius="4"/>
                   </ControlTemplate>
                 </Thumb.Template>
               </Thumb>