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="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="using:Toolkit.UI.Controls.Avalonia">
|
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">
|
<ControlTheme x:Key="ImageCropperThumbStyle" TargetType="Thumb">
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
<Setter Property="Background" Value="{DynamicResource SliderThumbBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ImageCropperThumbBackground}" />
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource SliderThumbBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ImageCropperThumbBrush}" />
|
||||||
<Setter Property="ClipToBounds" Value="False" />
|
<Setter Property="ClipToBounds" Value="False" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<Border
|
<Border
|
||||||
Margin="-2"
|
Margin="-2"
|
||||||
Background="{DynamicResource SliderOuterThumbBackground}"
|
Background="{DynamicResource ImageCropperThumbBackground}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{DynamicResource SliderThumbCornerRadius}">
|
CornerRadius="{DynamicResource ImageCropperThumbCornerRadius}">
|
||||||
<Ellipse
|
<Ellipse
|
||||||
Name="SliderInnerThumb"
|
Name="InnerThumb"
|
||||||
Width="{DynamicResource SliderInnerThumbWidth}"
|
Width="{DynamicResource ImageCropperInnerThumbWidth}"
|
||||||
Height="{DynamicResource SliderInnerThumbHeight}"
|
Height="{DynamicResource ImageCropperInnerThumbHeight}"
|
||||||
Fill="{TemplateBinding Background}"
|
Fill="{TemplateBinding Background}"
|
||||||
RenderTransform="scaleX(0.86) scaleY(0.86)">
|
RenderTransform="scaleX(0.86) scaleY(0.86)">
|
||||||
<Ellipse.Transitions>
|
<Ellipse.Transitions>
|
||||||
@@ -35,14 +52,13 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
<Style Selector="^:pointerover /template/ Ellipse#InnerThumb">
|
||||||
<Style Selector="^:pointerover /template/ Ellipse#SliderInnerThumb">
|
|
||||||
<Setter Property="RenderTransform" Value="scaleX(1.167) scaleY(1.167)" />
|
<Setter Property="RenderTransform" Value="scaleX(1.167) scaleY(1.167)" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed /template/ Ellipse#SliderInnerThumb">
|
<Style Selector="^:pressed /template/ Ellipse#InnerThumb">
|
||||||
<Setter Property="RenderTransform" Value="scaleX(0.71) scaleY(0.71)" />
|
<Setter Property="RenderTransform" Value="scaleX(0.71) scaleY(0.71)" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ Ellipse#SliderInnerThumb">
|
<Style Selector="^:disabled /template/ Ellipse#InnerThumb">
|
||||||
<Setter Property="RenderTransform" Value="scaleX(1.167) scaleY(1.167)" />
|
<Setter Property="RenderTransform" Value="scaleX(1.167) scaleY(1.167)" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
@@ -74,23 +90,23 @@
|
|||||||
Cursor="SizeAll" />
|
Cursor="SizeAll" />
|
||||||
<Thumb
|
<Thumb
|
||||||
x:Name="TopLeftButton"
|
x:Name="TopLeftButton"
|
||||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||||
<Thumb
|
<Thumb
|
||||||
x:Name="TopRightButton"
|
x:Name="TopRightButton"
|
||||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||||
<Thumb
|
<Thumb
|
||||||
x:Name="BottomLeftButton"
|
x:Name="BottomLeftButton"
|
||||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||||
<Thumb
|
<Thumb
|
||||||
x:Name="BottomRightButton"
|
x:Name="BottomRightButton"
|
||||||
Width="{DynamicResource SliderVerticalThumbWidth}"
|
Width="{DynamicResource ImageCropperThumbWidth}"
|
||||||
Height="{DynamicResource SliderVerticalThumbHeight}"
|
Height="{DynamicResource ImageCropperThumbHeight}"
|
||||||
Theme="{StaticResource ImageCropperThumbStyle}" />
|
Theme="{StaticResource ImageCropperThumbStyle}" />
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|||||||
Reference in New Issue
Block a user