Skip to content

Commit

Permalink
fix dialog animation and toast
Browse files Browse the repository at this point in the history
  • Loading branch information
kikipoulet committed Aug 12, 2024
1 parent 4eb86af commit e4db76f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
17 changes: 9 additions & 8 deletions SukiUI/Controls/SukiHost.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource SukiDialogBackground}"
IsHitTestVisible="False"
IsVisible="False"
Opacity="0.4">
IsHitTestVisible="False" IsVisible="False"
Opacity="0">

</Border>

Expand All @@ -38,7 +37,7 @@
Classes.opened="False"
CornerRadius="15"
IsHitTestVisible="False"
IsVisible="False">
Opacity="0">
<Border.Transitions>
<Transitions>
<ThicknessTransition Property="Margin" Duration="0:0:0.25">
Expand Down Expand Up @@ -94,6 +93,7 @@

<Style Selector="^ Border#PART_DialogBackground">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Opacity" Value="0.4" />
<Setter Property="IsHitTestVisible" Value="True" />
</Style>

Expand All @@ -115,7 +115,7 @@

<Style Selector="^ Border#borderDialog">
<Setter Property="Margin" Value="0,25,0,0" />
<Setter Property="IsVisible" Value="True" />
<Setter Property="Opacity" Value="1" />
<Setter Property="IsHitTestVisible" Value="True" />
<Setter Property="RenderTransform" Value="scale(1)" />
</Style>
Expand All @@ -125,7 +125,8 @@
<Style Selector="suki|SukiHost[IsDialogOpen=False]">

<Style Selector="^ Border#PART_DialogBackground">
<Setter Property="IsVisible" Value="False" />
<Setter Property="Opacity" Value="0" />

<Setter Property="IsHitTestVisible" Value="False" />
</Style>

Expand All @@ -145,7 +146,7 @@
</Style>

<Style Selector="^ Border#borderDialog">
<Setter Property="IsVisible" Value="False" />
<Setter Property="Opacity" Value="0" />
<Setter Property="IsHitTestVisible" Value="False" />
<Setter Property="RenderTransform" Value="scale(0.7)" />
<Setter Property="Margin" Value="0,125,0,0" />
Expand All @@ -160,4 +161,4 @@
<ControlTheme x:Key="{x:Type suki:SukiHost}"
BasedOn="{StaticResource SukiHostTheme}"
TargetType="suki:SukiHost" />
</ResourceDictionary>
</ResourceDictionary>
3 changes: 2 additions & 1 deletion SukiUI/Controls/SukiWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<suki:SukiHost />
</VisualLayerManager.ChromeOverlayLayer>
<Panel x:Name="PART_Root">
<suki:SukiBackground Name="PART_Background"
<!-- Margin -100 is there to exclude the unwanted bright corners -->
<suki:SukiBackground Name="PART_Background" Margin="-100"
AnimationEnabled="{TemplateBinding BackgroundAnimationEnabled}"
ShaderCode="{TemplateBinding BackgroundShaderCode}"
ShaderFile="{TemplateBinding BackgroundShaderFile}"
Expand Down

0 comments on commit e4db76f

Please sign in to comment.