Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 3b9b895

Browse files
committed
minor fixes
1 parent 896d3e2 commit 3b9b895

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

com.unity.uiwidgets/Runtime/rendering/flow.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public interface FlowPaintingContext {
88

99
int childCount { get; }
1010

11-
public Size getChildSize(int i);
11+
Size getChildSize(int i);
1212

13-
public void paintChild(int i, Matrix4 transform = null, float opacity = 1.0f);
13+
void paintChild(int i, Matrix4 transform = null, float opacity = 1.0f);
1414
}
1515

1616
public abstract class FlowDelegate {
@@ -161,7 +161,7 @@ public Size getChildSize(int i) {
161161
}
162162

163163
public void paintChild(int i, Matrix4 transform = null, float opacity = 1.0f) {
164-
transform ??= Matrix4.identity();
164+
transform = transform ?? Matrix4.identity();
165165
RenderBox child = _randomAccessChildren[i];
166166
FlowParentData childParentData = child.parentData as FlowParentData;
167167
D.assert(() => {
@@ -233,8 +233,8 @@ protected override bool hitTestChildren(BoxHitTestResult result, Offset position
233233
bool absorbed = result.addWithPaintTransform(
234234
transform: transform,
235235
position: position,
236-
hitTest: (BoxHitTestResult result, Offset position) => {
237-
return child.hitTest(result, position: position);
236+
hitTest: (BoxHitTestResult result2, Offset position2) => {
237+
return child.hitTest(result2, position: position2);
238238
}
239239
);
240240
if (absorbed)

com.unity.uiwidgets/Runtime/rendering/proxy_box.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,16 +762,18 @@ public void _updateOpacity() {
762762
public override void paint(PaintingContext context, Offset offset) {
763763
if (child != null) {
764764
if (_alpha == 0) {
765+
layer = null;
765766
return;
766767
}
767768

768769
if (_alpha == 255) {
770+
layer = null;
769771
context.paintChild(child, offset);
770772
return;
771773
}
772-
774+
773775
D.assert(needsCompositing);
774-
context.pushOpacity(offset, _alpha, base.paint);
776+
layer = context.pushOpacity(offset, _alpha, base.paint, layer as OpacityLayer);
775777
}
776778
}
777779

0 commit comments

Comments
 (0)