Use background hover state for mark-all-read actions

This commit is contained in:
Meik
2026-03-05 13:41:44 +01:00
parent 3432166a8e
commit 4e86ebbe3e
2 changed files with 67 additions and 66 deletions

View File

@@ -8,35 +8,29 @@
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="ReadAllIconStyle"
TargetType="{x:Type Image}">
<Style x:Key="ReadAllButtonChromeStyle"
TargetType="{x:Type Border}">
<Setter Property="Width"
Value="30" />
<Setter Property="Height"
Value="30" />
<Setter Property="CornerRadius"
Value="8" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="BorderBrush"
Value="Transparent" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Width"
Value="24" />
<Setter Property="Height"
Value="24" />
<Setter Property="Opacity"
Value="0.92" />
<Setter Property="RenderTransformOrigin"
Value="0.5,0.5" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1"
ScaleY="1" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Opacity"
Value="1" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1.06"
ScaleY="1.06" />
</Setter.Value>
</Setter>
<Setter Property="Background"
Value="{DynamicResource headerControlHoverBackgroundColor}" />
<Setter Property="BorderBrush"
Value="{DynamicResource cardBorderColor}" />
</Trigger>
</Style.Triggers>
</Style>
@@ -103,16 +97,22 @@
Foreground="{DynamicResource subtleTextColor}" />
</Border>
</StackPanel>
<Image Source="{DynamicResource appbar_list_check}"
x:Name="buttonReadAllAnnouncements"
x:FieldModifier="private"
Style="{StaticResource ReadAllIconStyle}"
ToolTip="{x:Static resx:Resources.removeMarkups}"
Tag="readAllAnnouncements"
PreviewMouseDown="ReadAll_PreviewMouseDown"
Grid.Column="2"
Canvas.Left="338"
Canvas.Top="14" />
<Border Style="{StaticResource ReadAllButtonChromeStyle}"
Canvas.Left="334"
Canvas.Top="11"
Visibility="{Binding Visibility, ElementName=buttonReadAllAnnouncements}"
ToolTip="{x:Static resx:Resources.removeMarkups}"
PreviewMouseDown="ReadAll_PreviewMouseDown">
<Image Source="{DynamicResource appbar_list_check}"
x:Name="buttonReadAllAnnouncements"
x:FieldModifier="private"
Tag="readAllAnnouncements"
Width="20"
Height="20"
IsHitTestVisible="False"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</Canvas>
</Grid>

View File

@@ -48,35 +48,29 @@
</Style.Triggers>
</Style>
<Style x:Key="ReadAllIconStyle"
TargetType="{x:Type Image}">
<Style x:Key="ReadAllButtonChromeStyle"
TargetType="{x:Type Border}">
<Setter Property="Width"
Value="30" />
<Setter Property="Height"
Value="30" />
<Setter Property="CornerRadius"
Value="8" />
<Setter Property="Background"
Value="Transparent" />
<Setter Property="BorderBrush"
Value="Transparent" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Width"
Value="24" />
<Setter Property="Height"
Value="24" />
<Setter Property="Opacity"
Value="0.92" />
<Setter Property="RenderTransformOrigin"
Value="0.5,0.5" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1"
ScaleY="1" />
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Opacity"
Value="1" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1.06"
ScaleY="1.06" />
</Setter.Value>
</Setter>
<Setter Property="Background"
Value="{DynamicResource headerControlHoverBackgroundColor}" />
<Setter Property="BorderBrush"
Value="{DynamicResource cardBorderColor}" />
</Trigger>
</Style.Triggers>
</Style>
@@ -153,14 +147,21 @@
x:Name="BtnCreateNewTicket"
Click="OnCreateNewTicketClicked"
Margin="0" />
<Image Source="{DynamicResource appbar_list_check}"
x:Name="buttonReadAllTickets"
Style="{StaticResource ReadAllIconStyle}"
Tag="readAllTickets"
PreviewMouseDown="ReadAll_PreviewMouseDown"
Canvas.Left="338"
Canvas.Top="14"
ToolTip="{x:Static resx:Resources.removeMarkups}" />
<Border Style="{StaticResource ReadAllButtonChromeStyle}"
Canvas.Left="334"
Canvas.Top="11"
Visibility="{Binding Visibility, ElementName=buttonReadAllTickets}"
ToolTip="{x:Static resx:Resources.removeMarkups}"
PreviewMouseDown="ReadAll_PreviewMouseDown">
<Image Source="{DynamicResource appbar_list_check}"
x:Name="buttonReadAllTickets"
Tag="readAllTickets"
Width="20"
Height="20"
IsHitTestVisible="False"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</Canvas>
</Grid>
</UserControl>