Update ImageCropper resources
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Toolkit.UI.Controls.Avalonia">
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<StaticResource x:Key="OverflowItemBackgroundSelected" ResourceKey="SubtleFillColorTransparentBrush" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<StaticResource x:Key="OverflowItemBackgroundSelected" ResourceKey="SubtleFillColorTransparentBrush" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<ControlTheme x:Key="{x:Type controls:CarouselViewItem}" TargetType="controls:CarouselViewItem">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<ContentPresenter
|
||||
x:Name="Content"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
FontFamily="{StaticResource ContentControlThemeFontFamily}"
|
||||
FontSize="{StaticResource ControlContentThemeFontSize}"
|
||||
Foreground="{TemplateBinding Foreground}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,7 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Toolkit.UI.Controls.Avalonia;
|
||||
|
||||
public class CardContent : ContentControl
|
||||
{
|
||||
}
|
||||
@@ -2,24 +2,41 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Toolkit.UI.Controls.Avalonia">
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<StaticResource x:Key="ImageCropperThumbBackground" ResourceKey="AccentFillColorDefaultBrush" />
|
||||
<StaticResource x:Key="ImageCropperThumbBrush" ResourceKey="ControlElevationBorderBrush" />
|
||||
<StaticResource x:Key="ImageCropperThumbBackground" ResourceKey="ControlSolidFillColorDefaultBrush" />
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<StaticResource x:Key="ImageCropperThumbBackground" ResourceKey="AccentFillColorDefaultBrush" />
|
||||
<StaticResource x:Key="ImageCropperThumbBrush" ResourceKey="ControlElevationBorderBrush" />
|
||||
<StaticResource x:Key="ImageCropperThumbBackground" ResourceKey="ControlSolidFillColorDefaultBrush" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
<CornerRadius x:Key="ImageCropperThumbCornerRadius">10</CornerRadius>
|
||||
<x:Double x:Key="ImageCropperInnerThumbWidth">12</x:Double>
|
||||
<x:Double x:Key="ImageCropperInnerThumbHeight">12</x:Double>
|
||||
<x:Double x:Key="ImageCropperThumbWidth">18</x:Double>
|
||||
<x:Double x:Key="ImageCropperThumbHeight">18</x:Double>
|
||||
<ControlTheme x:Key="ImageCropperThumbStyle" TargetType="Thumb">
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="{DynamicResource SliderThumbBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SliderThumbBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ImageCropperThumbBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ImageCropperThumbBrush}" />
|
||||
<Setter Property="ClipToBounds" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Border
|
||||
Margin="-2"
|
||||
Background="{DynamicResource SliderOuterThumbBackground}"
|
||||
Background="{DynamicResource ImageCropperThumbBackground}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{DynamicResource SliderThumbCornerRadius}">
|
||||
CornerRadius="{DynamicResource ImageCropperThumbCornerRadius}">
|
||||
<Ellipse
|
||||
Name="SliderInnerThumb"
|
||||
Width="{DynamicResource SliderInnerThumbWidth}"
|
||||
Height="{DynamicResource SliderInnerThumbHeight}"
|
||||
Name="InnerThumb"
|
||||
Width="{DynamicResource ImageCropperInnerThumbWidth}"
|
||||
Height="{DynamicResource ImageCropperInnerThumbHeight}"
|
||||
Fill="{TemplateBinding Background}"
|
||||
RenderTransform="scaleX(0.86) scaleY(0.86)">
|
||||
<Ellipse.Transitions>
|
||||
@@ -35,14 +52,13 @@
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^:pointerover /template/ Ellipse#SliderInnerThumb">
|
||||
<Style Selector="^:pointerover /template/ Ellipse#InnerThumb">
|
||||
<Setter Property="RenderTransform" Value="scaleX(1.167) scaleY(1.167)" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed /template/ Ellipse#SliderInnerThumb">
|
||||
<Style Selector="^:pressed /template/ Ellipse#InnerThumb">
|
||||
<Setter Property="RenderTransform" Value="scaleX(0.71) scaleY(0.71)" />
|
||||
</Style>
|
||||
<Style Selector="^:disabled /template/ Ellipse#SliderInnerThumb">
|
||||
<Style Selector="^:disabled /template/ Ellipse#InnerThumb">
|
||||
<Setter Property="RenderTransform" Value="scaleX(1.167) scaleY(1.167)" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
@@ -74,23 +90,23 @@
|
||||
Cursor="SizeAll" />
|
||||
<Thumb
|
||||
x:Name="TopLeftButton"
|
||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
||||
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||
<Thumb
|
||||
x:Name="TopRightButton"
|
||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
||||
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||
<Thumb
|
||||
x:Name="BottomLeftButton"
|
||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
||||
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||
<Thumb
|
||||
x:Name="BottomRightButton"
|
||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
||||
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||
</Canvas>
|
||||
</ControlTemplate>
|
||||
|
||||
Reference in New Issue
Block a user