Skip to content

Commit 1dc0515

Browse files
committed
Fix glitchy animation when moving the mouse too quickly on/off the bottom toolbar
1 parent bca03ae commit 1dc0515

File tree

1 file changed

+34
-19
lines changed

1 file changed

+34
-19
lines changed

CompactGUI/Views/MainWindow.xaml

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,25 +1110,40 @@
11101110
</ui:FontIcon>
11111111
</ui:AppBarButton.Icon>
11121112
</ui:AppBarButton>
1113-
<ui:AppBarButton Width="100" Command="{Binding MenuWatcherAreaCommand}" Margin="105,0,0,0" KeyboardNavigation.TabNavigation="None">
1114-
<ui:AppBarButton.Icon>
1115-
<ui:FontIcon Glyph="&#xE823;" Foreground="White" RenderTransformOrigin="0.5,0.5" >
1116-
1117-
</ui:FontIcon>
1118-
</ui:AppBarButton.Icon>
1119-
</ui:AppBarButton>
1120-
<bh:Interaction.Triggers>
1121-
<bh:EventTrigger EventName="MouseEnter">
1122-
<bh:ChangePropertyAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType={x:Type StackPanel}}}" PropertyName="Opacity" Value="1"
1123-
Duration="00:00:00.1"/>
1124-
</bh:EventTrigger>
1125-
<bh:EventTrigger EventName="MouseLeave">
1126-
<bh:ChangePropertyAction TargetObject="{Binding RelativeSource={RelativeSource AncestorType={x:Type StackPanel}}}" PropertyName="Opacity" Value="0"
1127-
Duration="00:00:00.5"/>
1128-
</bh:EventTrigger>
1129-
</bh:Interaction.Triggers>
1130-
1131-
</StackPanel>
1113+
<ui:AppBarButton Width="100"
1114+
Command="{Binding MenuWatcherAreaCommand}"
1115+
Margin="105,0,0,0"
1116+
KeyboardNavigation.TabNavigation="None">
1117+
<ui:AppBarButton.Icon>
1118+
<ui:FontIcon Glyph="&#xE823;"
1119+
Foreground="White"
1120+
RenderTransformOrigin="0.5,0.5">
1121+
1122+
</ui:FontIcon>
1123+
</ui:AppBarButton.Icon>
1124+
</ui:AppBarButton>
1125+
<StackPanel.Triggers>
1126+
<EventTrigger RoutedEvent="MouseEnter">
1127+
<BeginStoryboard>
1128+
<Storyboard>
1129+
<DoubleAnimation Storyboard.TargetProperty="Opacity"
1130+
To="1"
1131+
Duration="0:0:0.1" />
1132+
</Storyboard>
1133+
</BeginStoryboard>
1134+
</EventTrigger>
1135+
<EventTrigger RoutedEvent="MouseLeave">
1136+
<BeginStoryboard>
1137+
<Storyboard>
1138+
<DoubleAnimation Storyboard.TargetProperty="Opacity"
1139+
To="0"
1140+
Duration="0:0:0.5" />
1141+
</Storyboard>
1142+
</BeginStoryboard>
1143+
</EventTrigger>
1144+
</StackPanel.Triggers>
1145+
1146+
</StackPanel>
11321147

11331148
<!--Version String in Bottom Right-->
11341149
<TextBlock Text="{Binding Version, StringFormat=v {0}}" Foreground="#40FFFFFF" FontFamily="Segoe UI SemiBold" VerticalAlignment="Bottom" FontSize="14" Panel.ZIndex="1" IsHitTestVisible="False" HorizontalAlignment="Right" Margin="0,0,15,10"/>

0 commit comments

Comments
 (0)