feat: replace discrete FontWeight & specify DefaultFontWeight.

This commit is contained in:
Zhang Dian
2025-03-06 22:16:23 +08:00
parent 623ce798df
commit 38e4866531
8 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,6 @@
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutPadding}" />
<Setter Property="Focusable" Value="True" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="WindowManagerAddShadowHint" Value="False" />
<Setter Property="Template">
<ControlTemplate TargetType="ContextMenu">

View File

@@ -6,7 +6,6 @@
<Setter Property="Width" Value="296" />
<Setter Property="MinWidth" Value="296" />
<Setter Property="MaxHeight" Value="300" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />

View File

@@ -3,6 +3,7 @@
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="Template">
<ControlTemplate>

View File

@@ -59,7 +59,6 @@
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}"
FontWeight="Normal"
Foreground="{TemplateBinding Foreground}" />
</ControlTemplate>
</Setter>

View File

@@ -5,6 +5,7 @@
<ControlTheme x:Key="{x:Type ThemeVariantScope}" TargetType="ThemeVariantScope">
<Setter Property="TextElement.Foreground" Value="{DynamicResource DefaultForeground}" />
<Setter Property="TextElement.FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="TextElement.FontWeight" Value="{DynamicResource DefaultFontWeight}" />
<Setter Property="TextElement.FontFamily" Value="{DynamicResource DefaultFontFamily}" />
</ControlTheme>
</ResourceDictionary>

View File

@@ -6,7 +6,6 @@
<Setter Property="Width" Value="242" />
<Setter Property="MinWidth" Value="242" />
<Setter Property="MaxHeight" Value="300" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />

View File

@@ -7,6 +7,7 @@
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="Template">
<ControlTemplate TargetType="Window">

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="DefaultFontSize" ResourceKey="SemiFontSizeRegular" />
<StaticResource x:Key="DefaultFontWeight" ResourceKey="SemiFontWeightRegular" />
<StaticResource x:Key="DefaultFontFamily" ResourceKey="SemiFontFamilyRegular" />
</ResourceDictionary>