浏览代码

Merge pull request #300 from IIzzaya/master

[Fix] Fix chip debug outline paint error
/main
GitHub 5 年前
当前提交
42f3525b
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 7
      Runtime/material/chip.cs

7
Runtime/material/chip.cs


const bool _debugShowTapTargetOutlines = false;
public override void debugPaint(PaintingContext context, Offset offset) {
D.assert(!_debugShowTapTargetOutlines);
D.assert(() => {
bool visualizeTapTargets() {
Paint outlinePaint = new Paint();
outlinePaint.color = new Color(0xff800000);
outlinePaint.strokeWidth = 1.0f;

outlinePaint.color = new Color(0xff008000);
context.canvas.drawRect(this.pressRect.shift(offset), outlinePaint);
return true;
});
}
D.assert(!_debugShowTapTargetOutlines || visualizeTapTargets());
}
protected override bool hitTestSelf(Offset position) {

正在加载...
取消
保存