- Adjust Badge layout

- Fix glyph margin in win11light
This commit is contained in:
DB p 2025-04-12 00:56:07 +09:00
parent 8aff3c9f2a
commit c66cbae78b
2 changed files with 7 additions and 12 deletions

View file

@ -102,8 +102,6 @@
<Grid> <Grid>
<Image <Image
x:Name="ImageIcon" x:Name="ImageIcon"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsHitTestVisible="False" IsHitTestVisible="False"
RenderOptions.BitmapScalingMode="Fant" RenderOptions.BitmapScalingMode="Fant"
Source="{Binding Image, TargetNullValue={x:Null}}" Source="{Binding Image, TargetNullValue={x:Null}}"
@ -131,24 +129,21 @@
<TextBlock <TextBlock
x:Name="GlyphIcon" x:Name="GlyphIcon"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{Binding Glyph.FontFamily}" FontFamily="{Binding Glyph.FontFamily}"
Style="{DynamicResource ItemGlyph}" Style="{DynamicResource ItemGlyph}"
Text="{Binding Glyph.Glyph}" Text="{Binding Glyph.Glyph}"
Visibility="{Binding ShowGlyph}" /> Visibility="{Binding ShowGlyph}" />
<Image <Image
x:Name="BadgeIcon" x:Name="BadgeIcon"
Width="16" Width="{Binding ElementName=ImageIcon, Path=ActualWidth}"
Height="16" Height="{Binding ElementName=ImageIcon, Path=ActualHeight}"
Margin="0 2 4 0" RenderOptions.BitmapScalingMode="HighQuality"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
RenderOptions.BitmapScalingMode="Fant"
Source="{Binding BadgeImage, TargetNullValue={x:Null}}" Source="{Binding BadgeImage, TargetNullValue={x:Null}}"
Visibility="{Binding ShowBadge}" /> Visibility="{Binding ShowBadge}" />
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>
<Grid <Grid

View file

@ -38,7 +38,7 @@
BasedOn="{StaticResource BaseGlyphStyle}" BasedOn="{StaticResource BaseGlyphStyle}"
TargetType="{x:Type TextBlock}"> TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource Color05B}" /> <Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="Margin" Value="-4 0 0 0" /> <Setter Property="Margin" Value="0 0 0 0" />
</Style> </Style>
<Style <Style
x:Key="QueryBoxStyle" x:Key="QueryBoxStyle"
@ -180,7 +180,7 @@
<Setter Property="Foreground" Value="{DynamicResource Color05B}" /> <Setter Property="Foreground" Value="{DynamicResource Color05B}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Margin" Value="-4 0 0 0" /> <Setter Property="Margin" Value="0 0 0 0" />
<Setter Property="Width" Value="25" /> <Setter Property="Width" Value="25" />
<Setter Property="Height" Value="25" /> <Setter Property="Height" Value="25" />
<Setter Property="FontSize" Value="25" /> <Setter Property="FontSize" Value="25" />