mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add ContentControlThemeFontFamily to support dynamic font styling
This commit is contained in:
parent
02252c2181
commit
2d1e9ecd3b
2 changed files with 7 additions and 1 deletions
|
|
@ -177,6 +177,7 @@ namespace Flow.Launcher
|
||||||
|
|
||||||
_mainWindow = new MainWindow();
|
_mainWindow = new MainWindow();
|
||||||
Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
|
Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
|
||||||
|
Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont);
|
||||||
|
|
||||||
API.LogInfo(ClassName, "Dependencies Info:{ErrorReporting.DependenciesInfo()}");
|
API.LogInfo(ClassName, "Dependencies Info:{ErrorReporting.DependenciesInfo()}");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@
|
||||||
<Style TargetType="Window">
|
<Style TargetType="Window">
|
||||||
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
|
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<FontFamily x:Key="ContentControlThemeFontFamily">
|
||||||
|
{DynamicResource SettingWindowFont}
|
||||||
|
</FontFamily>
|
||||||
|
|
||||||
<ContextMenu x:Key="TextBoxContextMenu">
|
<ContextMenu x:Key="TextBoxContextMenu">
|
||||||
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}">
|
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}">
|
||||||
|
|
@ -1360,7 +1363,6 @@
|
||||||
<Setter Property="SelectionBrush" Value="{DynamicResource TextControlSelectionHighlightColor}" />
|
<Setter Property="SelectionBrush" Value="{DynamicResource TextControlSelectionHighlightColor}" />
|
||||||
<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
|
<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
|
||||||
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
||||||
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
|
|
||||||
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
||||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
||||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
||||||
|
|
@ -1584,6 +1586,7 @@
|
||||||
|
|
||||||
<Style BasedOn="{StaticResource DefaultPasswordBoxStyle}" TargetType="PasswordBox">
|
<Style BasedOn="{StaticResource DefaultPasswordBoxStyle}" TargetType="PasswordBox">
|
||||||
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
|
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
|
||||||
|
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style
|
<Style
|
||||||
|
|
@ -2744,6 +2747,7 @@
|
||||||
Margin="{TemplateBinding BorderThickness}"
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
Focusable="False"
|
Focusable="False"
|
||||||
|
FontFamily="{DynamicResource ContentControlThemeFontFamily}"
|
||||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
||||||
IsTabStop="False"
|
IsTabStop="False"
|
||||||
|
|
@ -2756,6 +2760,7 @@
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="{TemplateBinding BorderThickness}"
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
|
FontFamily="{DynamicResource ContentControlThemeFontFamily}"
|
||||||
Foreground="{TemplateBinding ui:ControlHelper.PlaceholderForeground}"
|
Foreground="{TemplateBinding ui:ControlHelper.PlaceholderForeground}"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
Text="{TemplateBinding ui:ControlHelper.PlaceholderText}"
|
Text="{TemplateBinding ui:ControlHelper.PlaceholderText}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue