fix: remove useless code in IPBox IME.
This commit is contained in:
@@ -4,28 +4,21 @@ using Avalonia.Input.TextInput;
|
|||||||
|
|
||||||
namespace Ursa.Controls;
|
namespace Ursa.Controls;
|
||||||
|
|
||||||
public class IPv4BoxInputMethodClient:TextInputMethodClient
|
public class IPv4BoxInputMethodClient: TextInputMethodClient
|
||||||
{
|
{
|
||||||
private TextPresenter? _presenter;
|
private TextPresenter? _presenter;
|
||||||
public override Visual TextViewVisual => _presenter;
|
public override Visual TextViewVisual => _presenter!;
|
||||||
public override bool SupportsPreedit => false;
|
public override bool SupportsPreedit => false;
|
||||||
public override bool SupportsSurroundingText => true;
|
public override bool SupportsSurroundingText => true;
|
||||||
|
|
||||||
public override string SurroundingText
|
public override string SurroundingText { get; } = null!;
|
||||||
{
|
|
||||||
get;
|
public override Rect CursorRectangle { get; } = new();
|
||||||
}
|
|
||||||
public override Rect CursorRectangle { get; }
|
|
||||||
public override TextSelection Selection { get; set; }
|
public override TextSelection Selection { get; set; }
|
||||||
private IPv4Box? _parent;
|
|
||||||
public void SetPresenter(TextPresenter? presenter)
|
public void SetPresenter(TextPresenter? presenter)
|
||||||
{
|
{
|
||||||
|
_presenter = presenter;
|
||||||
this.RaiseTextViewVisualChanged();
|
this.RaiseTextViewVisualChanged();
|
||||||
this.RaiseCursorRectangleChanged();
|
this.RaiseCursorRectangleChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnParentPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
|
|
||||||
{
|
|
||||||
this.RaiseSelectionChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user