浏览代码

fix widget_Inspector.cs

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
412a2923
共有 7 个文件被更改,包括 795 次插入216 次删除
  1. 29
      com.unity.uiwidgets/Runtime/foundation/assertions.cs
  2. 13
      com.unity.uiwidgets/Runtime/foundation/diagnostics.cs
  3. 3
      com.unity.uiwidgets/Runtime/rendering/layer.cs
  4. 17
      com.unity.uiwidgets/Runtime/rendering/object.cs
  5. 13
      com.unity.uiwidgets/Runtime/widgets/app.cs
  6. 2
      com.unity.uiwidgets/Runtime/widgets/binding.cs
  7. 934
      com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs

29
com.unity.uiwidgets/Runtime/foundation/assertions.cs


return buffer.ToString().TrimEnd();
}
}
class DiagnosticsStackTrace : DiagnosticsBlock {
public DiagnosticsStackTrace(
string name,
IterableFilter<String> stackFilter,
bool showSeparator = true) : base(
name: name,
properties: new List<DiagnosticsNode>(),
style: DiagnosticsTreeStyle.flat,
showSeparator: showSeparator,
allowTruncate: true
) {
}
public DiagnosticsStackTrace(
string name,
string frame,
bool showSeparator = true
) : base(
name: name,
properties: new List<DiagnosticsNode>() {_createStackFrame(frame)},
style: DiagnosticsTreeStyle.whitespace,
showSeparator: showSeparator
) {
}
public static DiagnosticsNode _createStackFrame(string frame) {
return DiagnosticsNode.message(frame, allowWrap: false);
}
}
public class UIWidgetsError : Exception {
public UIWidgetsError(string message) : base(message) {

13
com.unity.uiwidgets/Runtime/foundation/diagnostics.cs


}
public enum DiagnosticsTreeStyle {
error,
flat,
singleLine,
errorProperty,
}

public static DiagnosticsNode message(
string message,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.singleLine,
DiagnosticLevel level = DiagnosticLevel.info
DiagnosticLevel level = DiagnosticLevel.info,
bool allowWrap = true
D.assert(style != null);
D.assert(level != null);
return new DiagnosticsProperty<object>(
"",
null,

public virtual DiagnosticsNode toDiagnosticsNode(
string name = null,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse) {
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse ) {
return new DiagnosticableNode<Diagnosticable>(
name: name, value: this, style: style
);

public override DiagnosticsNode toDiagnosticsNode(
string name = null,
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse) {
DiagnosticsTreeStyle style = DiagnosticsTreeStyle.sparse ) {
return new _DiagnosticableTreeNode(
name: name,
value: this,

3
com.unity.uiwidgets/Runtime/rendering/layer.cs


});
return scene;
}
Future<ui.Image> toImage(Rect bounds, float pixelRatio = 1.0f)// async
public Future<ui.Image> toImage(Rect bounds, float pixelRatio = 1.0f)// async
{
D.assert(bounds != null);
D.assert(pixelRatio != null);

17
com.unity.uiwidgets/Runtime/rendering/object.cs


public delegate void PaintingContextCallback(PaintingContext context, Offset offset);
public class PaintingContext : ClipContext {
PaintingContext(
public PaintingContext(
ContainerLayer containerLayer = null,
Rect estimatedBounds = null
) {

});
}
public void paintChild(RenderObject child, Offset offset) {
public virtual void paintChild(RenderObject child, Offset offset) {
if (child.isRepaintBoundary) {
stopRecordingIfNeeded();
_compositeChild(child, offset);

childContext.stopRecordingIfNeeded();
}
protected PaintingContext createChildContext(ContainerLayer childLayer, Rect bounds) {
public virtual PaintingContext createChildContext(ContainerLayer childLayer, Rect bounds) {
return new PaintingContext(childLayer, bounds);
}

}
public readonly RenderObject renderObject;
}
public class DiagnosticsDebugCreator : DiagnosticsProperty<object> {
public DiagnosticsDebugCreator(object value)
: base(
"debugCreator",
value,
level: DiagnosticLevel.hidden
) {
D.assert(value != null);
}
}
}

13
com.unity.uiwidgets/Runtime/widgets/app.cs


);
}*/
D.assert(() => {
if (WidgetInspectorService.instance.debugShowInspector) {
result = new WidgetInspector(null, result, _InspectorSelectButtonBuilder);
if (widget.debugShowWidgetInspector || WidgetsApp.debugShowWidgetInspectorOverride) {
result = new WidgetInspector(
child: result,
selectButtonBuilder: widget.inspectorSelectButtonBuilder
);
}
if (widget.debugShowCheckedModeBanner && WidgetsApp.debugAllowBannerOverride) {
result = new CheckedModeBanner(
child: result
);
return true;
/*if (widget.debugShowWidgetInspector || WidgetsApp.debugShowWidgetInspectorOverride) {
result = new WidgetInspector(

2
com.unity.uiwidgets/Runtime/widgets/binding.cs


_buildOwner = new BuildOwner();
buildOwner.onBuildScheduled = _handleBuildScheduled;
window.onLocaleChanged += handleLocaleChanged;
widgetInspectorService = new WidgetInspectorService(this);
widgetInspectorService = new WidgetInspectorService();
// window.onAccessibilityFeaturesChanged = handleAccessibilityFeaturesChanged;
// SystemChannels.navigation.setMethodCallHandler(_handleNavigationInvocation);

934
com.unity.uiwidgets/Runtime/widgets/widget_inspector.cs
文件差异内容过多而无法显示
查看文件

正在加载...
取消
保存