Browse Source
Merge branch 'master' into precise-nocom-locks
pull/5149/head
Dariusz Komosiński
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
2 deletions
-
src/Avalonia.Controls/TextBox.cs
-
src/Avalonia.Themes.Fluent/Controls/ContextMenu.xaml
-
src/Avalonia.Themes.Fluent/Controls/MenuItem.xaml
|
|
|
@ -867,7 +867,10 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
var point = e.GetPosition(_presenter); |
|
|
|
|
|
|
|
point = new Point(MathUtilities.Clamp(point.X, 0, _presenter.Bounds.Width - 1), MathUtilities.Clamp(point.Y, 0, _presenter.Bounds.Height - 1)); |
|
|
|
point = new Point( |
|
|
|
MathUtilities.Clamp(point.X, 0, Math.Max(_presenter.Bounds.Width - 1, 0)), |
|
|
|
MathUtilities.Clamp(point.Y, 0, Math.Max(_presenter.Bounds.Height - 1, 0))); |
|
|
|
|
|
|
|
CaretIndex = SelectionEnd = _presenter.GetCaretIndex(point); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -39,6 +39,7 @@ |
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
|
|
|
<Setter Property="TextBlock.FontSize" Value="{DynamicResource ContentControlFontSize}" /> |
|
|
|
<Setter Property="TextBlock.FontWeight" Value="Normal" /> |
|
|
|
<Setter Property="WindowManagerAddShadowHint" Value="False" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<Border Background="{TemplateBinding Background}" |
|
|
|
|
|
|
|
@ -110,7 +110,7 @@ |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
<Popup Name="PART_Popup" |
|
|
|
WindowManagerAddShadowHint="True" |
|
|
|
WindowManagerAddShadowHint="False" |
|
|
|
PlacementMode="Right" |
|
|
|
HorizontalOffset="{StaticResource MenuFlyoutSubItemPopupHorizontalOffset}" |
|
|
|
IsLightDismissEnabled="True" |
|
|
|
|