Skip to content

Commit

Permalink
- Fixed bug where the font used by default didn't coincide with the s…
Browse files Browse the repository at this point in the history
…elected font in the Font Settings window.

- Improved the displaying of font families in the Font Settings window.
  • Loading branch information
Max DR committed Jul 7, 2020
1 parent 4a25c7e commit f24af2f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ModernNotepad/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"
DispatcherUnhandledException="Application_DispatcherUnhandledException">
<Application.Resources>
<ResourceDictionary>
<sys:Boolean x:Key="AutoHideScrollBars">True</sys:Boolean>
<ResourceDictionary.MergedDictionaries>
<ui:ThemeResources/>
<ui:XamlControlsResources/>
Expand Down
9 changes: 6 additions & 3 deletions ModernNotepad/Views/FontSettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@
<Setter Property="Control.FontSize" Value="14" />
</Style>
</ComboBox.Resources>
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel/>
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBox.ItemTemplate>
<DataTemplate>
<VirtualizingStackPanel VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling">
<TextBlock Style="{StaticResource FontStyle}" Text="{Binding}" ToolTip="{Binding}"/>
</VirtualizingStackPanel>
<TextBlock Style="{StaticResource FontStyle}" Text="{Binding}" ToolTip="{Binding}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
Expand Down
2 changes: 1 addition & 1 deletion ModernNotepad/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
</Popup>

<cc:TextArea x:Name="textArea" Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
IsInactiveSelectionHighlightEnabled="True" Padding="10,5,20,6"
IsInactiveSelectionHighlightEnabled="True" Padding="10,5,20,6" FontFamily="Consolas" FontSize="14"
Style="{StaticResource TextAreaStyle}"
SpellCheck.IsEnabled="{Binding SettingsViewModel.IsSpellCheckingEnabled}"
TextWrapping="{Binding SettingsViewModel.IsWordWrapEnabled, Converter={StaticResource BooleanToTextWrapping}}">
Expand Down

0 comments on commit f24af2f

Please sign in to comment.