浏览代码

Merge remote-tracking branch 'origin/master' into text

/main
fzhangtj 6 年前
当前提交
5ebbfcca
共有 14 个文件被更改,包括 344 次插入152 次删除
  1. 10
      Assets/UIWidgets/Tests/Menu.cs
  2. 13
      Assets/UIWidgets/Tests/Widgets.cs
  3. 16
      Assets/UIWidgets/editor/editor_window.cs
  4. 19
      Assets/UIWidgets/foundation/diagnostics.cs
  5. 24
      Assets/UIWidgets/painting/text_style.cs
  6. 13
      Assets/UIWidgets/ui/text.cs
  7. 2
      Assets/UIWidgets/widgets/basic.cs
  8. 2
      Assets/UIWidgets/widgets/binding.cs
  9. 6
      Assets/UIWidgets/widgets/editable_text.cs
  10. 55
      Assets/UIWidgets/widgets/framework.cs
  11. 2
      Assets/UIWidgets/widgets/sliver.cs
  12. 193
      Assets/UIWidgets/widgets/text.cs
  13. 138
      Assets/UIWidgets/Tests/SceneViewTests.cs
  14. 3
      Assets/UIWidgets/Tests/SceneViewTests.cs.meta

10
Assets/UIWidgets/Tests/Menu.cs


public static void renderScrollViews() {
EditorWindow.GetWindow(typeof(ScrollViews));
}
[MenuItem("UIWidgetsTests/Show SceneViewTests")]
public static void showSceneView() {
SceneViewTests.show();
}
[MenuItem("UIWidgetsTests/Hide SceneViewTests")]
public static void hideSceneView() {
SceneViewTests.hide();
}
}
}

13
Assets/UIWidgets/Tests/Widgets.cs


// if local image test
if (selected == 0) {
localImagePath = EditorGUILayout.TextField(localImagePath);
if (this._selected != selected) {
this._selected = selected;
this.windowAdapter.attachRootWidget(null);

if (pixels <= headerHeight) {
setState(() => { _offsetY = pixels / 2.0; });
}
}
else {
} else {
if (_offsetY != 0.0) {
setState(() => { _offsetY = 0.0; });
}

color: CLColors.background1,
child: new Container(
color: CLColors.background1,
child: new Column(
children: new List<Widget> {
this._buildHeader(context),
child: new Column(
children: new List<Widget> {
this._buildHeader(context),
}
}
)
)
);

16
Assets/UIWidgets/editor/editor_window.cs


namespace UIWidgets.editor {
public class WindowAdapter : Window {
public WindowAdapter(EditorWindow editorWindow) {
this._editorWindow = editorWindow;
this._editorWindow.wantsMouseMove = false;
this._editorWindow.wantsMouseEnterLeaveWindow = false;
this.editorWindow = editorWindow;
this.editorWindow.wantsMouseMove = false;
this.editorWindow.wantsMouseEnterLeaveWindow = false;
this._devicePixelRatio = EditorGUIUtility.pixelsPerPoint;

}
}
readonly EditorWindow _editorWindow;
public readonly EditorWindow editorWindow;
readonly WidgetsBinding _binding;

dirty = true;
}
if (this._lastPosition != this._editorWindow.position) {
if (this._lastPosition != this.editorWindow.position) {
this._lastPosition = this._editorWindow.position;
this._lastPosition = this.editorWindow.position;
this._physicalSize = new Size(
this._lastPosition.width * EditorGUIUtility.pixelsPerPoint,
this._lastPosition.height * EditorGUIUtility.pixelsPerPoint);

}
public override void scheduleFrame() {
if (this._editorWindow != null) {
this._editorWindow.Repaint();
if (this.editorWindow != null) {
this.editorWindow.Repaint();
}
}

19
Assets/UIWidgets/foundation/diagnostics.cs


}
}
public class FlagProperty : DiagnosticsProperty<bool> {
public FlagProperty(String name,
bool value,
public class FlagProperty : DiagnosticsProperty<bool?> {
public FlagProperty(string name,
bool? value,
string ifTrue = null,
string ifFalse = null,
bool showName = false,

public readonly string ifFalse;
protected override string valueToString(TextTreeConfiguration parentConfiguration = null) {
if (this.value) {
if (this.value == true) {
} else if (!this.value) {
} else if (this.value == false) {
if (this.ifFalse != null) {
return this.ifFalse;
}

public override bool showName {
get {
if (this.value && this.ifTrue == null || !this.value == false && this.ifFalse == null) {
if (this.value == null || this.value == true && this.ifTrue == null || this.value == false && this.ifFalse == null) {
return true;
}

public override DiagnosticLevel level {
get {
if (this.value) {
if (this.value == true) {
if (!this.value) {
if (this.value == false) {
if (this.ifFalse == null) {
return DiagnosticLevel.hidden;
}

);
internal static readonly _NoDefaultValue kNoDefaultValue = new _NoDefaultValue();
internal static readonly _NullDefaultValue kNullDefaultValue = new _NullDefaultValue();
public static readonly object kNullDefaultValue = new _NullDefaultValue();
public static string shortHash(object o) {
return (o.GetHashCode() & 0xFFFFF).ToString("X").PadLeft(5, '0');

24
Assets/UIWidgets/painting/text_style.cs


base.debugFillProperties(properties);
List<DiagnosticsNode> styles = new List<DiagnosticsNode>();
styles.Add(new DiagnosticsProperty<Color>("color", color, defaultValue: null));
styles.Add(new StringProperty("family", fontFamily, defaultValue: null, quoted: false));
styles.Add(new DiagnosticsProperty<double?>("size", fontSize, defaultValue: null));
styles.Add(new DiagnosticsProperty<Color>("color", color, defaultValue: Diagnostics.kNullDefaultValue));
styles.Add(new StringProperty("family", fontFamily, defaultValue: Diagnostics.kNullDefaultValue, quoted: false));
styles.Add(new DiagnosticsProperty<double?>("size", fontSize, defaultValue: Diagnostics.kNullDefaultValue));
string weightDescription = "";
if (fontWeight != null)
{

"weight",
fontWeight,
description: weightDescription,
defaultValue: null
defaultValue: Diagnostics.kNullDefaultValue
styles.Add(new EnumProperty<FontStyle?>("style", fontStyle, defaultValue: null));
styles.Add(new DiagnosticsProperty<double?>("letterSpacing", letterSpacing, defaultValue: null));
styles.Add(new DiagnosticsProperty<double?>("wordSpacing", wordSpacing, defaultValue: null));
styles.Add(new EnumProperty<TextBaseline?>("baseline", textBaseline, defaultValue: null));
styles.Add(new DiagnosticsProperty<double?>("height", height, defaultValue: null));
styles.Add(new StringProperty("background", background == null ? null : background.ToString(), defaultValue: null, quoted: false));
styles.Add(new EnumProperty<FontStyle?>("style", fontStyle, defaultValue: Diagnostics.kNullDefaultValue));
styles.Add(new DiagnosticsProperty<double?>("letterSpacing", letterSpacing, defaultValue: Diagnostics.kNullDefaultValue));
styles.Add(new DiagnosticsProperty<double?>("wordSpacing", wordSpacing, defaultValue: Diagnostics.kNullDefaultValue));
styles.Add(new EnumProperty<TextBaseline?>("baseline", textBaseline, defaultValue: Diagnostics.kNullDefaultValue));
styles.Add(new DiagnosticsProperty<double?>("height", height, defaultValue: Diagnostics.kNullDefaultValue));
styles.Add(new StringProperty("background", background == null ? null : background.ToString(), defaultValue: Diagnostics.kNullDefaultValue, quoted: false));
if (decoration != null)
{
List<string> decorationDescription = new List<string>();

}
styles.Add(new DiagnosticsProperty<Color>("decorationColor", decorationColor, defaultValue: null,
styles.Add(new DiagnosticsProperty<Color>("decorationColor", decorationColor, defaultValue: Diagnostics.kNullDefaultValue,
level: DiagnosticLevel.fine));
if (decorationColor != null)
{

styles.Add(new DiagnosticsProperty<TextDecoration>("decoration", decoration, defaultValue: null,
styles.Add(new DiagnosticsProperty<TextDecoration>("decoration", decoration, defaultValue: Diagnostics.kNullDefaultValue,
level: DiagnosticLevel.hidden));
if (decoration != null)
decorationDescription.Add("$decoration");

13
Assets/UIWidgets/ui/text.cs


{
public enum FontStyle
{
/// Use the upright glyphs
/// Use glyphs designed for slanting
italic,
}

public enum TextAlign
{
/// Align the text on the left edge of the container.
/// Align the text on the right edge of the container.
/// Align the text in the center of the container.
/// Stretch lines of text that end with a soft line break to fill the width of
/// the container.
///
/// Lines that end with hard line breaks are aligned towards the [start] edge.
justify,
}

2
Assets/UIWidgets/widgets/basic.cs


}
}
public class Flexible : ParentDataWidget {
public class Flexible : ParentDataWidget<Flex> {
public Flexible(
Key key = null,
int flex = 1,

2
Assets/UIWidgets/widgets/binding.cs


get { return this._buildOwner; }
}
private readonly BuildOwner _buildOwner = new BuildOwner();
readonly BuildOwner _buildOwner = new BuildOwner();
public FocusManager focusManager {
get { return this._buildOwner.focusManager; }

6
Assets/UIWidgets/widgets/editable_text.cs


{
style.debugFillProperties(properties);
}
properties.add(new EnumProperty<TextAlign>("textAlign", textAlign, defaultValue: null));
properties.add(new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: null));
properties.add(new DiagnosticsProperty<double>("textScaleFactor", textScaleFactor, defaultValue: null));
properties.add(new EnumProperty<TextAlign>("textAlign", textAlign, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<double>("textScaleFactor", textScaleFactor, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<int>("maxLines", maxLines, defaultValue: 1));
properties.add(new DiagnosticsProperty<bool>("autofocus", autofocus, defaultValue: false));
}

55
Assets/UIWidgets/widgets/framework.cs


: base(key: key, child: child) {
}
public abstract bool debugIsValidAncestor(RenderObjectWidget ancestor);
public abstract string debugDescribeInvalidAncestorChain(
string description = null,
string ownershipChain = null,
bool foundValidAncestor = false,
IEnumerable<Widget> badAncestors = null
);
public abstract void applyParentData(RenderObject renderObject);
public virtual bool debugCanApplyOutOfTurn() {
return false;
}
}
public abstract class ParentDataWidget<T> : ParentDataWidget where T : RenderObjectWidget {
public ParentDataWidget(Key key = null, Widget child = null)
: base(key: key, child: child) {
}
public virtual bool debugIsValidAncestor(RenderObjectWidget ancestor) {
return ancestor is RenderObjectWidget;
public override bool debugIsValidAncestor(RenderObjectWidget ancestor) {
D.assert(typeof(T) != typeof(RenderObjectWidget));
return ancestor is T;
public virtual string debugDescribeInvalidAncestorChain(
String description = null, String ownershipChain = null, bool foundValidAncestor = false,
public override string debugDescribeInvalidAncestorChain(
string description = null,
string ownershipChain = null,
bool foundValidAncestor = false,
String result;
D.assert(typeof(T) != typeof(RenderObjectWidget));
string result;
result = string.Format("{0} widgets must be placed inside {1} widgets.\n" +
"{2} has no {1} ancestor at all.\n", this.GetType(), typeof(RenderObjectWidget), description);
result = string.Format(
"{0} widgets must be placed inside {1} widgets.\n" +
"{2} has no {1} ancestor at all.\n", this.GetType(), typeof(T), description);
result = string.Format("{0} widgets must be placed directly inside {1} widgets.\n" +
result = string.Format(
"{0} widgets must be placed directly inside {1} widgets.\n" +
this.GetType(), typeof(RenderObjectWidget), description);
this.GetType(), typeof(T), description);
foreach (Widget ancestor in badAncestors) {
if (ancestor.GetType() == this.GetType()) {

}
}
result += "These widgets cannot come between a " + this.GetType() + " and its " + typeof(RenderObjectWidget) + ".\n";
result += "These widgets cannot come between a " + this.GetType() + " and its " + typeof(T) + ".\n";
}
result += "The ownership chain for the parent of the offending "

public abstract void applyParentData(RenderObject renderObject);
public virtual bool debugCanApplyOutOfTurn() {
return false;
}
public abstract class InheritedWidget : ProxyWidget {
protected InheritedWidget(Key key = null, Widget child = null) : base(key, child) {

2
Assets/UIWidgets/widgets/sliver.cs


}
}
public class KeepAlive : ParentDataWidget{
public class KeepAlive : ParentDataWidget<SliverMultiBoxAdaptorWidget> {
public KeepAlive(
Key key = null,
bool keepAlive = true,

193
Assets/UIWidgets/widgets/text.cs


using UIWidgets.ui;
using TextStyle = UIWidgets.painting.TextStyle;
namespace UIWidgets.widgets
{
public class DefaultTextStyle : InheritedWidget
{
public DefaultTextStyle(TextStyle style, Widget child,
TextAlign textAlign, int maxLines = 0,
namespace UIWidgets.widgets {
public class DefaultTextStyle : InheritedWidget {
public DefaultTextStyle(
Key key = null,
TextStyle style = null,
TextAlign? textAlign = null,
TextOverflow overflow = TextOverflow.clip, Key key = null) : base(key, child)
{
TextOverflow overflow = TextOverflow.clip,
int? maxLines = null,
Widget child = null
) : base(key, child) {
D.assert(maxLines == null || maxLines > 0);
this.overflow = overflow;
this.overflow = overflow;
}
private DefaultTextStyle() {
this.style = new TextStyle();
this.textAlign = null;
this.softWrap = true;
this.overflow = TextOverflow.clip;
this.maxLines = null;
public static DefaultTextStyle fallback()
{
return new DefaultTextStyle(new TextStyle(), null, TextAlign.left, 0, true,
TextOverflow.clip, null);
public static DefaultTextStyle fallback() {
return new DefaultTextStyle();
public static Widget merge(Key key, TextStyle style, TextAlign? textAlign,
bool? softWrap, TextOverflow? overflow, int? maxLines, Widget child)
{
public static Widget merge(
Key key = null,
TextStyle style = null,
TextAlign? textAlign = null,
bool? softWrap = null,
TextOverflow? overflow = null,
int? maxLines = null,
Widget child = null
) {
return new Builder(builder: (context =>
{
return new Builder(builder: (context => {
var parent = DefaultTextStyle.of(context);
return new DefaultTextStyle(
key: key,

}
public readonly TextStyle style;
public readonly TextAlign textAlign;
public readonly TextAlign? textAlign;
public readonly int maxLines;
public readonly int? maxLines;
public static DefaultTextStyle of(BuildContext context)
{
public static DefaultTextStyle of(BuildContext context) {
public override bool updateShouldNotify(InheritedWidget w)
{
public override bool updateShouldNotify(InheritedWidget w) {
return style != oldWidget.style ||
textAlign != oldWidget.textAlign ||
softWrap != oldWidget.softWrap ||
overflow != oldWidget.overflow ||
maxLines != oldWidget.maxLines;
return this.style != oldWidget.style ||
this.textAlign != oldWidget.textAlign ||
this.softWrap != oldWidget.softWrap ||
this.overflow != oldWidget.overflow ||
this.maxLines != oldWidget.maxLines;
public override void debugFillProperties(DiagnosticPropertiesBuilder properties)
{
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
if (style != null)
{
style.debugFillProperties(properties);
if (this.style != null) {
this.style.debugFillProperties(properties);
properties.add(new EnumProperty<TextAlign>("textAlign", textAlign, defaultValue: null));
properties.add(new FlagProperty("softWrap", value: softWrap, ifTrue: "wrapping at box width",
properties.add(new EnumProperty<TextAlign?>("textAlign", this.textAlign,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new FlagProperty("softWrap", value: this.softWrap, ifTrue: "wrapping at box width",
properties.add(new EnumProperty<TextOverflow>("overflow", overflow, defaultValue: null));
properties.add(new IntProperty("maxLines", maxLines, defaultValue: null));
properties.add(new EnumProperty<TextOverflow>("overflow", this.overflow,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new IntProperty("maxLines", this.maxLines,
defaultValue: Diagnostics.kNullDefaultValue));
public class Text : StatelessWidget
{
public Text(string data, Key key = null, TextStyle style = null,
TextAlign? textAlign = null, bool? softWrap = null,
TextOverflow? overflow = null, double? textScaleFactor = null, int? maxLines = null) : base(key)
{
public class Text : StatelessWidget {
public Text(string data,
Key key = null,
TextStyle style = null,
TextAlign? textAlign = null,
bool? softWrap = null,
TextOverflow? overflow = null,
double? textScaleFactor = null,
int? maxLines = null) : base(key) {
D.assert(data != null);
this.textSpan = null;
this.data = data;

this.maxLines = maxLines;
}
public Text(TextSpan textSpan, Key key = null, TextStyle style = null,
TextAlign? textAlign = null, bool? softWrap = null,
TextOverflow? overflow = null, double? textScaleFactor = null, int? maxLines = null) : base(key)
{
private Text(TextSpan textSpan,
Key key = null,
TextStyle style = null,
TextAlign? textAlign = null,
bool? softWrap = null,
TextOverflow? overflow = null,
double? textScaleFactor = null,
int? maxLines = null) : base(key) {
D.assert(textSpan != null);
this.textSpan = textSpan;
this.data = null;

this.maxLines = maxLines;
}
public static Text rich(TextSpan textSpan,
Key key = null,
TextStyle style = null,
TextAlign? textAlign = null,
bool? softWrap = null,
TextOverflow? overflow = null,
double? textScaleFactor = null,
int? maxLines = null) {
return new Text(
textSpan, key,
style,
textAlign,
softWrap,
overflow,
textScaleFactor,
maxLines);
}
public readonly string data;
public readonly TextSpan textSpan;

public readonly TextAlign? textAlign;
public readonly TextDirection? textDirection;
public readonly bool? softWrap;
public readonly TextOverflow? overflow;

public readonly int? maxLines;
public override Widget build(BuildContext context)
{
public override Widget build(BuildContext context) {
TextStyle effectiveTextStyle = style;
if (style == null || style.inherit)
{
effectiveTextStyle = defaultTextStyle.style.merge(style);
TextStyle effectiveTextStyle = this.style;
if (this.style == null || this.style.inherit) {
effectiveTextStyle = defaultTextStyle.style.merge(this.style);
textAlign: textAlign ?? defaultTextStyle.textAlign,
softWrap: softWrap ?? defaultTextStyle.softWrap,
overflow: overflow ?? defaultTextStyle.overflow,
textScaleFactor: textScaleFactor ?? 1.0, // MediaQuery.textScaleFactorOf(context), todo
maxLines: maxLines ?? defaultTextStyle.maxLines,
textAlign: this.textAlign ?? defaultTextStyle.textAlign ?? TextAlign.left,
softWrap: this.softWrap ?? defaultTextStyle.softWrap,
overflow: this.overflow ?? defaultTextStyle.overflow,
textScaleFactor: this.textScaleFactor ?? 1.0, // MediaQuery.textScaleFactorOf(context), todo
maxLines: this.maxLines ?? defaultTextStyle.maxLines,
text: data,
children: textSpan != null ? new List<TextSpan>() {textSpan} : null
text: this.data,
children: this.textSpan != null ? new List<TextSpan> {this.textSpan} : null
public override void debugFillProperties(DiagnosticPropertiesBuilder properties)
{
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties.add(new StringProperty("data", data, showName: false));
if (textSpan != null)
{
properties.add(textSpan.toDiagnosticsNode(name: "textSpan", style: DiagnosticsTreeStyle.transition));
properties.add(new StringProperty("data", this.data, showName: false));
if (this.textSpan != null) {
properties.add(this.textSpan.toDiagnosticsNode(name: "textSpan", style: DiagnosticsTreeStyle.transition));
if (style != null)
{
style.debugFillProperties(properties);
if (this.style != null) {
this.style.debugFillProperties(properties);
properties.add(new EnumProperty<TextAlign?>("textAlign", textAlign, defaultValue: null));
properties.add(new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: null));
properties.add(new FlagProperty("softWrap", value: softWrap ?? false, ifTrue: "wrapping at box width",
ifFalse: "no wrapping except at line break characters", showName: true)); // todo ObjectFlagProperty
properties.add(new EnumProperty<TextOverflow?>("overflow", overflow, defaultValue: null));
properties.add(new DoubleProperty("textScaleFactor", textScaleFactor, defaultValue: null));
properties.add(new IntProperty("maxLines", maxLines, defaultValue: null));
properties.add(new EnumProperty<TextAlign?>("textAlign", this.textAlign,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new FlagProperty("softWrap", value: this.softWrap, ifTrue: "wrapping at box width",
ifFalse: "no wrapping except at line break characters", showName: true));
properties.add(new EnumProperty<TextOverflow?>("overflow", this.overflow,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DoubleProperty("textScaleFactor", this.textScaleFactor,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new IntProperty("maxLines", this.maxLines, defaultValue: Diagnostics.kNullDefaultValue));
}
}
}

138
Assets/UIWidgets/Tests/SceneViewTests.cs


using System;
using System.Linq;
using UIWidgets.editor;
using UIWidgets.painting;
using UIWidgets.rendering;
using UIWidgets.widgets;
using UnityEditor;
using UnityEngine;
using Color = UIWidgets.ui.Color;
namespace UIWidgets.Tests {
public class SceneViewTests {
public static void show() {
SceneView.onSceneGUIDelegate += OnSceneGUI;
EditorApplication.update += Update;
SceneView.RepaintAll();
_options = new Func<Widget>[] {
none,
listView,
eventsPage,
};
_optionStrings = _options.Select(x => x.Method.Name).ToArray();
_selected = 0;
}
public static void hide() {
SceneView.onSceneGUIDelegate -= OnSceneGUI;
EditorApplication.update -= Update;
SceneView.RepaintAll();
}
private static Func<Widget>[] _options;
private static string[] _optionStrings;
private static int _selected;
[NonSerialized] private static bool hasInvoked = false;
private static void OnSceneGUI(SceneView sceneView) {
HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive));
Handles.BeginGUI();
if (windowAdapter == null) {
windowAdapter = new WindowAdapter(sceneView);
} else if (windowAdapter != null && windowAdapter.editorWindow != sceneView) {
windowAdapter = new WindowAdapter(sceneView);
}
var selected = EditorGUILayout.Popup("test case", _selected, _optionStrings);
if (selected != _selected || !hasInvoked) {
_selected = selected;
hasInvoked = true;
var widget = _options[_selected]();
windowAdapter.attachRootWidget(widget);
}
windowAdapter.OnGUI();
Handles.EndGUI();
}
private static void Update() {
if (windowAdapter != null) {
windowAdapter.Update();
}
}
private static WindowAdapter windowAdapter;
public static Widget none() {
return null;
}
public static Widget listView() {
return ListView.builder(
itemExtent: 20.0,
itemBuilder: (context, index) => {
return new Container(
color: Color.fromARGB(255, (index * 10) % 256, (index * 10) % 256, (index * 10) % 256)
);
}
);
}
public static Widget eventsPage() {
return new Container(
color: CLColors.primary,
margin: EdgeInsets.all(50),
child:new Text(
"Today",
style: new TextStyle(
fontSize: 34,
color: CLColors.white
)
)
);
//return new EventsWaterfallScreen();
}
public static RenderBox flex() {
var flexbox = new RenderFlex(
direction: Axis.horizontal,
crossAxisAlignment: CrossAxisAlignment.center);
flexbox.add(new RenderConstrainedBox(
additionalConstraints: new BoxConstraints(minWidth: 300, minHeight: 200),
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
color: new Color(0xFF00FF00)
)
)));
flexbox.add(new RenderConstrainedBox(
additionalConstraints: new BoxConstraints(minWidth: 100, minHeight: 300),
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
color: new Color(0xFF00FFFF)
)
)));
flexbox.add(new RenderConstrainedBox(
additionalConstraints: new BoxConstraints(minWidth: 50, minHeight: 100),
child: new RenderDecoratedBox(
decoration: new BoxDecoration(
color: new Color(0xFF0000FF)
)
)));
return flexbox;
}
}
}

3
Assets/UIWidgets/Tests/SceneViewTests.cs.meta


fileFormatVersion: 2
guid: fc7ab0f913ef4bde95759153a732dbc0
timeCreated: 1537936714
正在加载...
取消
保存