Browse Source

Merge pull request #9897 from Mikolaytis/FixTabWidth

[Text] fix tab width. It's too long
pull/9928/head
Benedikt Stebner 3 years ago
committed by GitHub
parent
commit
dcb8e908c2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      samples/ControlCatalog/Pages/TextBoxPage.xaml
  2. 7
      src/Avalonia.Base/Media/TextFormatting/TextParagraphProperties.cs

2
samples/ControlCatalog/Pages/TextBoxPage.xaml

@ -38,7 +38,7 @@
UseFloatingWatermark="True"
PasswordChar="*"
Text="Password" />
<TextBox Width="200" Text="Left aligned text" TextAlignment="Left" />
<TextBox Width="200" Text="Left aligned text" TextAlignment="Left" AcceptsTab="True" />
<TextBox Width="200" Text="Center aligned text" TextAlignment="Center" />
<TextBox Width="200" Text="Right aligned text" TextAlignment="Right" />
<TextBox Width="200" Text="Custom selection brush"

7
src/Avalonia.Base/Media/TextFormatting/TextParagraphProperties.cs

@ -63,14 +63,11 @@
{
get { return 0; }
}
/// <summary>
/// Gets the default incremental tab width.
/// </summary>
public virtual double DefaultIncrementalTab
{
get { return 4 * DefaultTextRunProperties.FontRenderingEmSize; }
}
public virtual double DefaultIncrementalTab => 0;
/// <summary>
/// Gets the letter spacing.

Loading…
Cancel
Save