Browse Source
Merge branch 'master' into fixes/compositing-renderer-hit-test
pull/8847/head
Nikita Tsukanov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
30 additions and
14 deletions
-
src/Avalonia.Controls/Documents/InlineUIContainer.cs
-
src/Avalonia.Controls/RichTextBlock.cs
-
src/Web/Avalonia.Web.Blazor/AvaloniaView.razor
|
|
|
@ -87,18 +87,7 @@ namespace Avalonia.Controls.Documents |
|
|
|
|
|
|
|
public override TextRunProperties? Properties { get; } |
|
|
|
|
|
|
|
public override Size Size |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (!Control.IsMeasureValid) |
|
|
|
{ |
|
|
|
Control.Measure(Size.Infinity); |
|
|
|
} |
|
|
|
|
|
|
|
return Control.DesiredSize; |
|
|
|
} |
|
|
|
} |
|
|
|
public override Size Size => Control.DesiredSize; |
|
|
|
|
|
|
|
public override double Baseline |
|
|
|
{ |
|
|
|
@ -118,7 +107,7 @@ namespace Avalonia.Controls.Documents |
|
|
|
|
|
|
|
public override void Draw(DrawingContext drawingContext, Point origin) |
|
|
|
{ |
|
|
|
Control.Arrange(new Rect(origin, Size)); |
|
|
|
//noop
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -544,6 +544,32 @@ namespace Avalonia.Controls |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
protected override Size MeasureOverride(Size availableSize) |
|
|
|
{ |
|
|
|
foreach (var child in VisualChildren) |
|
|
|
{ |
|
|
|
if (child is Control control) |
|
|
|
{ |
|
|
|
control.Measure(Size.Infinity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return base.MeasureOverride(availableSize); |
|
|
|
} |
|
|
|
|
|
|
|
protected override Size ArrangeOverride(Size finalSize) |
|
|
|
{ |
|
|
|
foreach (var child in VisualChildren) |
|
|
|
{ |
|
|
|
if (child is Control control) |
|
|
|
{ |
|
|
|
control.Arrange(new Rect(control.DesiredSize)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return base.ArrangeOverride(finalSize); |
|
|
|
} |
|
|
|
|
|
|
|
private string GetSelection() |
|
|
|
{ |
|
|
|
if (!IsTextSelectionEnabled) |
|
|
|
|
|
|
|
@ -15,7 +15,8 @@ |
|
|
|
<input id="inputElement" @ref="_inputElement" type="text" @oninput="OnInput" |
|
|
|
onpaste="return false;" |
|
|
|
oncopy="return false;" |
|
|
|
oncut="return false;"/> |
|
|
|
oncut="return false;" |
|
|
|
autocapitalize="none"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<style> |
|
|
|
|