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>
<Image Source="{DynamicResource appbar_list_check}" <Border Style="{StaticResource ReadAllButtonChromeStyle}"
x:Name="buttonReadAllAnnouncements" Canvas.Left="334"
x:FieldModifier="private" Canvas.Top="11"
Style="{StaticResource ReadAllIconStyle}" Visibility="{Binding Visibility, ElementName=buttonReadAllAnnouncements}"
ToolTip="{x:Static resx:Resources.removeMarkups}" ToolTip="{x:Static resx:Resources.removeMarkups}"
Tag="readAllAnnouncements" PreviewMouseDown="ReadAll_PreviewMouseDown">
PreviewMouseDown="ReadAll_PreviewMouseDown" <Image Source="{DynamicResource appbar_list_check}"
Grid.Column="2" x:Name="buttonReadAllAnnouncements"
Canvas.Left="338" x:FieldModifier="private"
Canvas.Top="14" /> Tag="readAllAnnouncements"
Width="20"
Height="20"
IsHitTestVisible="False"
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" />
<Image Source="{DynamicResource appbar_list_check}" <Border Style="{StaticResource ReadAllButtonChromeStyle}"
x:Name="buttonReadAllTickets" Canvas.Left="334"
Style="{StaticResource ReadAllIconStyle}" Canvas.Top="11"
Tag="readAllTickets" Visibility="{Binding Visibility, ElementName=buttonReadAllTickets}"
PreviewMouseDown="ReadAll_PreviewMouseDown" ToolTip="{x:Static resx:Resources.removeMarkups}"
Canvas.Left="338" PreviewMouseDown="ReadAll_PreviewMouseDown">
Canvas.Top="14" <Image Source="{DynamicResource appbar_list_check}"
ToolTip="{x:Static resx:Resources.removeMarkups}" /> x:Name="buttonReadAllTickets"
Tag="readAllTickets"
Width="20"
Height="20"
IsHitTestVisible="False"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
</Canvas> </Canvas>
</Grid> </Grid>
</UserControl> </UserControl>