浏览代码

bug fix on comparing textSpan

/main
xingwei.zhu 6 年前
当前提交
84534614
共有 3 个文件被更改,包括 9 次插入0 次删除
  1. 1
      Runtime/painting/basic_types.cs
  2. 5
      Runtime/painting/text_span.cs
  3. 3
      Runtime/rendering/paragraph.cs

1
Runtime/painting/basic_types.cs


public enum RenderComparison {
identical,
metadata,
hoverCallback,
paint,
layout,
}

5
Runtime/painting/text_span.cs


RenderComparison result = Equals(this.recognizer, other.recognizer)
? RenderComparison.identical
: RenderComparison.metadata;
if (!Equals(this.recognizer, other.recognizer)) {
result = RenderComparison.hoverCallback > result ? RenderComparison.hoverCallback : result;
}
if (this.style != null) {
var candidate = this.style.compareTo(other.style);
if (candidate > result) {

3
Runtime/rendering/paragraph.cs


case RenderComparison.identical:
case RenderComparison.metadata:
return;
case RenderComparison.hoverCallback:
this._textPainter.text = value;
break;
case RenderComparison.paint:
this._textPainter.text = value;
this.markNeedsPaint();

正在加载...
取消
保存