浏览代码

fix text input issue caused by incorrect TextDirection

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
b25a421a
共有 4 个文件被更改,包括 20 次插入4 次删除
  1. 2
      com.unity.uiwidgets/Runtime/ui2/text.cs
  2. 8
      com.unity.uiwidgets/Runtime/widgets/app.cs
  3. 1
      com.unity.uiwidgets/Runtime/widgets/image.cs
  4. 13
      com.unity.uiwidgets/Runtime/widgets/shortcuts.cs

2
com.unity.uiwidgets/Runtime/ui2/text.cs


}
public enum TextDirection {
rtl,
rtl
}
public class TextBox : IEquatable<TextBox> {

8
com.unity.uiwidgets/Runtime/widgets/app.cs


Widget result;
if (widget.builder != null) {
result = new Builder(
builder: context1 => { return widget.builder(context: context, child: navigator); });
builder: context1 => { return widget.builder(context: context1, child: navigator); });
}
else {
D.assert(navigator != null);

return true;
});
//Fix Me !!
//TODO: the following line is a work-around for some potential TextDirection bug
//In the home page of the Shrine sample, the positions of the buttons are not correct, which is
//determined by the TextDirection of some widget. we should fix it!
result = new Directionality(child: result, TextDirection.ltr);
Widget title = null;
if (widget.onGenerateTitle != null) {

1
com.unity.uiwidgets/Runtime/widgets/image.cs


}
void _resolveImage() {
//TODO: why refactoring this code? we need a PR to fix it!
/*ScrollAwareImageProvider<object> provider = new ScrollAwareImageProvider<object>(
context: _scrollAwareContext,
imageProvider: widget.image);*/

13
com.unity.uiwidgets/Runtime/widgets/shortcuts.cs


}
D.assert(context != null);
/*LogicalKeySet keySet = keysPressed ?? new LogicalKeySet(RawKeyboard.instance.keysPressed);
//FIX ME !
//Since we process key event produced by Unity instead of raw input info (physical key) from os directly,
//we cannot handle the shortcut key press as in original flutter code
//TODO: however, we need find out a way to make this work in another way
return false;
/*
LogicalKeySet keySet = keysPressed ?? new LogicalKeySet(RawKeyboard.instance.keysPressed);
Intent matchedIntent = _shortcuts[keySet];
if (matchedIntent == null) {

return false;
}
return Actions.invoke(primaryContext, matchedIntent, nullOk: true);
}*/
}
*/
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {

正在加载...
取消
保存