浏览代码

fix EdgeInsets bug

/siyaoH-1.17-PlatformMessage
guanghuispark 3 年前
当前提交
fbe7e703
共有 2 个文件被更改,包括 15 次插入21 次删除
  1. 2
      com.unity.uiwidgets/Runtime/painting/borders.cs
  2. 34
      com.unity.uiwidgets/Runtime/painting/edge_insets.cs

2
com.unity.uiwidgets/Runtime/painting/borders.cs


get {
return borders.Aggregate(
EdgeInsets.zero,
(previousValue, border) => previousValue.add(border.dimensions));
(EdgeInsetsGeometry previousValue, ShapeBorder border) => previousValue.add(border.dimensions));
}
}

34
com.unity.uiwidgets/Runtime/painting/edge_insets.cs


return new Size(size.width - horizontal, size.height - vertical);
}
protected EdgeInsetsGeometry subtract(EdgeInsetsGeometry other) {
public virtual EdgeInsetsGeometry subtract(EdgeInsetsGeometry other) {
return _MixedEdgeInsets.fromLRSETB(
_left - other._left,
_right - other._right,

);
}
public EdgeInsetsGeometry add(EdgeInsetsGeometry other) {
public virtual EdgeInsetsGeometry add(EdgeInsetsGeometry other) {
return _MixedEdgeInsets.fromLRSETB(
_left + other._left,
_right + other._right,

get { return fromSTEB(end, bottom, start, top); }
}
public EdgeInsetsGeometry subtract(EdgeInsetsDirectional other) {
public override EdgeInsetsGeometry subtract(EdgeInsetsGeometry other) {
return this - other;
return this - (EdgeInsetsDirectional)other;
public EdgeInsetsGeometry add(EdgeInsetsDirectional other) {
public override EdgeInsetsGeometry add(EdgeInsetsGeometry other) {
return this + other;
return this + (EdgeInsetsDirectional)other;
return base.add(other);
}

rect.right - right, rect.bottom - bottom);
}
public EdgeInsets subtract(EdgeInsets other) {
return fromLTRB(
left - other.left,
top - other.top,
right - other.right,
bottom - other.bottom
);
public override EdgeInsetsGeometry subtract(EdgeInsetsGeometry other) {
if(other is EdgeInsets)
return this - (EdgeInsets)other;
return base.subtract(other);
public EdgeInsets add(EdgeInsetsGeometry other) {
return fromLTRB(
left + other._left,
top + other._top,
right + other._right,
bottom + other._bottom
);
public override EdgeInsetsGeometry add(EdgeInsetsGeometry other) {
if(other is EdgeInsets)
return this + (EdgeInsets)other;
return base.add(other);
}
public override EdgeInsetsGeometry clamp(EdgeInsetsGeometry min, EdgeInsetsGeometry max) {

正在加载...
取消
保存