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

View File

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