mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-01 09:24:58 +00:00
refactor: rewrite the font configuration (#366)
* input font name directly instead of a font picker because localized font family name is not supported by Avalonia * fallback monospace font to default font * remove unused code
This commit is contained in:
parent
24dde77548
commit
9057b71f2d
20 changed files with 96 additions and 169 deletions
|
@ -157,39 +157,19 @@
|
|||
Text="{DynamicResource Text.Preference.Appearance.DefaultFont}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
MinHeight="28"
|
||||
Padding="8,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding #ThisControl.InstalledFonts}"
|
||||
SelectedItem="{Binding DefaultFont, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="FontFamily">
|
||||
<Border Height="24">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" FontFamily="{Binding}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<TextBox Grid.Row="1" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding DefaultFontFamily, Mode=TwoWay}"/>
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Appearance.MonospaceFont}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||
MinHeight="28"
|
||||
Padding="8,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding #ThisControl.InstalledMonospaceFonts}"
|
||||
SelectedItem="{Binding MonospaceFont, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate DataType="FontFamily">
|
||||
<Border Height="24">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" FontFamily="{Binding}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<TextBox Grid.Row="2" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding MonospaceFontFamily, Mode=TwoWay}"/>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Appearance.DefaultFontSize}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue