Browse Source

[Text] fix tab width. It's too long

pull/9897/head
Sergey Mikolaitis 4 years ago
parent
commit
490c9b1ffe
  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" UseFloatingWatermark="True"
PasswordChar="*" PasswordChar="*"
Text="Password" /> 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="Center aligned text" TextAlignment="Center" />
<TextBox Width="200" Text="Right aligned text" TextAlignment="Right" /> <TextBox Width="200" Text="Right aligned text" TextAlignment="Right" />
<TextBox Width="200" Text="Custom selection brush" <TextBox Width="200" Text="Custom selection brush"

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

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

Loading…
Cancel
Save