浏览代码

fix some errors

/siyaoH-1.17-PlatformMessage
guanghuispark 4 年前
当前提交
897cc603
共有 3 个文件被更改,包括 7 次插入84 次删除
  1. 2
      com.unity.uiwidgets/Runtime/rendering/editable.cs
  2. 85
      com.unity.uiwidgets/Runtime/rendering/object.mixin.gen.cs
  3. 4
      com.unity.uiwidgets/Runtime/rendering/paragraph.cs

2
com.unity.uiwidgets/Runtime/rendering/editable.cs


markNeedsLayout();
}
public void systemFontsDidChange() {
public override void systemFontsDidChange() {
base.systemFontsDidChange();
_textPainter.markNeedsLayout();
_textLayoutLastMaxWidth = null;

85
com.unity.uiwidgets/Runtime/rendering/object.mixin.gen.cs


public abstract class RelayoutWhenSystemFontsChangeMixinRenderBox : RenderBox, RelayoutWhenSystemFontsChangeMixin {
public void systemFontsDidChange() {
public virtual void systemFontsDidChange() {
markNeedsLayout();
}

public abstract class
RelayoutWhenSystemFontsChangeMixinRenderBoxContainerDefaultsMixinContainerRenderObjectMixinRenderBox<ChildType, ParentDataType>
: RenderBoxContainerDefaultsMixinContainerRenderObjectMixinRenderBox<ChildType, ParentDataType>
: RenderBoxContainerDefaultsMixinContainerRenderObjectMixinRenderBox<ChildType, ParentDataType>, RelayoutWhenSystemFontsChangeMixin
public float? defaultComputeDistanceToFirstActualBaseline(TextBaseline baseline) {
var child = firstChild;
while (child != null) {
var childParentData = (ParentDataType) child.parentData;
float? result = child.getDistanceToActualBaseline(baseline);
if (result != null) {
return result.Value + childParentData.offset.dy;
}
child = childParentData.nextSibling;
}
return null;
}
public float? defaultComputeDistanceToHighestActualBaseline(TextBaseline baseline) {
float? result = null;
var child = firstChild;
while (child != null) {
var childParentData = (ParentDataType) child.parentData;
float? candidate = child.getDistanceToActualBaseline(baseline);
if (candidate != null) {
candidate += childParentData.offset.dy;
if (result != null) {
result = Mathf.Min(result.Value, candidate.Value);
} else {
result = candidate;
}
}
child = childParentData.nextSibling;
}
return result;
}
public void defaultPaint(PaintingContext context, Offset offset) {
var child = firstChild;
while (child != null) {
var childParentData = (ParentDataType) child.parentData;
context.paintChild(child, childParentData.offset + offset);
child = childParentData.nextSibling;
}
}
public bool defaultHitTestChildren(BoxHitTestResult result, Offset position) {
ChildType child = lastChild;
while (child != null) {
ParentDataType childParentData = child.parentData as ParentDataType;
bool isHit = result.addWithPaintOffset(
offset: childParentData.offset,
position: position,
hitTest: (BoxHitTestResult boxHitTestResult, Offset transformed) => {
D.assert(transformed == position - childParentData.offset);
return child.hitTest(boxHitTestResult, position: transformed);
}
);
if (isHit)
return true;
child = childParentData.previousSibling;
}
return false;
}
public List<ChildType> getChildrenAsList() {
var result = new List<ChildType>();
var child = firstChild;
while (child != null) {
var childParentData = (ParentDataType) child.parentData;
result.Add(child);
child = childParentData.nextSibling;
}
return result;
}
public void systemFontsDidChange() {
public virtual void systemFontsDidChange() {
markNeedsLayout();
}

4
com.unity.uiwidgets/Runtime/rendering/paragraph.cs


}
}
public void attach(object owner) {
public override void attach(object owner) {
base.attach(owner);
/*if (_hoverAnnotation != null) {
RendererBinding.instance.mouseTracker.attachAnnotation(_hoverAnnotation);

_textPainter.layout(minWidth, widthMatters ? maxWidth : float.PositiveInfinity);
}
public void systemFontsDidChange() {
public override void systemFontsDidChange() {
base.systemFontsDidChange();
_textPainter.markNeedsLayout();
}

正在加载...
取消
保存