misc: alter popup duration time.

This commit is contained in:
Zhang Dian
2024-12-25 13:58:34 +08:00
parent c437e6c79c
commit b03dfdf494

View File

@@ -2,20 +2,13 @@
x:Class="Semi.Avalonia.SemiPopupAnimations" x:Class="Semi.Avalonia.SemiPopupAnimations"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Semi.Avalonia.Converters"> xmlns:converters="clr-namespace:Semi.Avalonia.Converters">
<Design.PreviewWith>
<Border Padding="20">
<!-- Add Controls for Previewer Here -->
</Border>
</Design.PreviewWith>
<!-- Add Styles Here -->
<Style Selector="Popup LayoutTransformControl#PART_LayoutTransform"> <Style Selector="Popup LayoutTransformControl#PART_LayoutTransform">
<Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={x:Static converters:PlacementToRenderTransformOriginConverter.Instance}}"></Setter> <Setter Property="RenderTransformOrigin" Value="{Binding $parent[Popup].Placement, Converter={x:Static converters:PlacementToRenderTransformOriginConverter.Instance}}" />
</Style> </Style>
<Style Selector="Popup[IsOpen=True] LayoutTransformControl#PART_LayoutTransform"> <Style Selector="Popup[IsOpen=True] LayoutTransformControl#PART_LayoutTransform">
<Style.Animations> <Style.Animations>
<Animation Duration="0:0:0.3" FillMode="Forward" Easing="CubicEaseIn"> <Animation Duration="0:0:0.1" FillMode="Forward" Easing="CubicEaseIn">
<KeyFrame Cue="0.0"> <KeyFrame Cue="0.0">
<Setter Property="ScaleTransform.ScaleX" Value="0.98" /> <Setter Property="ScaleTransform.ScaleX" Value="0.98" />
<Setter Property="ScaleTransform.ScaleY" Value="0.98" /> <Setter Property="ScaleTransform.ScaleY" Value="0.98" />
@@ -29,7 +22,7 @@
</Style> </Style>
<Style Selector="Popup[IsOpen=False] LayoutTransformControl#PART_LayoutTransform"> <Style Selector="Popup[IsOpen=False] LayoutTransformControl#PART_LayoutTransform">
<Style.Animations> <Style.Animations>
<Animation Duration="0:0:0.3" FillMode="Forward" Easing="CubicEaseOut"> <Animation Duration="0:0:0.1" FillMode="Forward" Easing="CubicEaseOut">
<KeyFrame Cue="0.0"> <KeyFrame Cue="0.0">
<Setter Property="ScaleTransform.ScaleX" Value="1.0" /> <Setter Property="ScaleTransform.ScaleX" Value="1.0" />
<Setter Property="ScaleTransform.ScaleY" Value="1.0" /> <Setter Property="ScaleTransform.ScaleY" Value="1.0" />