mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-28 23:54:59 +00:00
style<*>: custom font style
This commit is contained in:
parent
780b4b9d18
commit
2c37ff98e6
5 changed files with 11 additions and 8 deletions
|
@ -138,14 +138,12 @@ namespace SourceGit.Views.Widgets {
|
|||
|
||||
#region EVENTS
|
||||
private void LayoutTextPreview(List<Models.TextLine> lines) {
|
||||
var font = new FontFamily(Models.Preference.Instance.General.FontFamilyWindow);
|
||||
|
||||
var maxLineNumber = $"{lines.Count + 1}";
|
||||
var formatted = new FormattedText(
|
||||
maxLineNumber,
|
||||
CultureInfo.CurrentCulture,
|
||||
FlowDirection.LeftToRight,
|
||||
new Typeface(font, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal),
|
||||
new Typeface(txtPreviewData.FontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal),
|
||||
12.0,
|
||||
Brushes.Black,
|
||||
VisualTreeHelper.GetDpi(this).PixelsPerDip);
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
||||
xmlns:validations="clr-namespace:SourceGit.Views.Validations"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
FontFamily="{Binding Source={x:Static models:Preference.Instance}, Path=General.FontFamilyContent, Mode=OneWay}">
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<converter:BoolToCollapsed x:Key="BoolToCollapsed"/>
|
||||
</UserControl.Resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue