浏览代码

add some files

/zgh-devtools
guanghuispark 4 年前
当前提交
e48f562c
共有 4 个文件被更改,包括 59 次插入14 次删除
  1. 23
      com.unity.uiwidgets.devtools/Editor/inspector/layout_explorer/box/box.cs
  2. 3
      com.unity.uiwidgets/Runtime/animation/animation_controller.cs
  3. 4
      com.unity.uiwidgets/Runtime/widgets/single_child_scroll_view.cs
  4. 43
      com.unity.uiwidgets.devtools/Editor/inspector/inspector_text_style.cs

23
com.unity.uiwidgets.devtools/Editor/inspector/layout_explorer/box/box.cs


}
public class BoxLayoutExplorerWidget : LayoutExplorerWidget {
public BoxLayoutExplorerWidget(
InspectorController inspectorController,
Key key
) : base(inspectorController, key: key){ }
public BoxLayoutExplorerWidget(
InspectorController inspectorController = null,
Key key = null
) : base(inspectorController, key: key)
{
}
public static bool shouldDisplay(RemoteDiagnosticsNode node) {
// TODO(jacobr) pass a RemoteDiagnosticsNode to this method that contains
// the layout explorer related supplemental properties so that we can
// accurately determine whether the widget uses box layout.
return node != null;
}
public static bool shouldDisplay(RemoteDiagnosticsNode node) {
// TODO(jacobr) pass a RemoteDiagnosticsNode to this method that contains
// the layout explorer related supplemental properties so that we can
// accurately determine whether the widget uses box layout.
return node != null;
}
public override State createState()

3
com.unity.uiwidgets/Runtime/animation/animation_controller.cs


public override float value {
get { return _value; }
float _value;
public float _value;
public void setValue(float newValue) {
stop();

4
com.unity.uiwidgets/Runtime/widgets/single_child_scroll_view.cs


public class SingleChildScrollView : StatelessWidget {
public SingleChildScrollView(
Key key = null,
Axis scrollDirection = Axis.vertical,
Axis? scrollDirection = null,
bool reverse = false,
EdgeInsetsGeometry padding = null,
bool? primary = null,

() =>
"Primary ScrollViews obtain their ScrollController via inheritance from a PrimaryScrollController widget. " +
"You cannot both set primary to true and pass an explicit controller.");
this.scrollDirection = scrollDirection;
this.scrollDirection = scrollDirection?? Axis.vertical;
this.reverse = reverse;
this.padding = padding;
this.primary = primary ?? controller == null && scrollDirection == Axis.vertical;

43
com.unity.uiwidgets.devtools/Editor/inspector/inspector_text_style.cs


using uiwidgets;
using Unity.UIWidgets.material;
using Unity.UIWidgets.ui;
using TextStyle = Unity.UIWidgets.painting.TextStyle;
using ThemeUtils = Unity.UIWidgets.DevTools.inspector.layout_explorer.ui.ThemeUtils;
namespace Unity.UIWidgets.DevTools.inspector
{
public class inspector_text_styles
{
public static TextStyle unimportant(ColorScheme colorScheme)
{
return new TextStyle(
color: CommonThemeUtils.isLight ? Colors.grey.shade500 : Colors.grey.shade600);
}
public static TextStyle regular = new TextStyle();
public static TextStyle warning(ColorScheme colorScheme) => new TextStyle(
color:
CommonThemeUtils.isLight ? Colors.orange.shade900 : Colors.orange.shade400);
public static TextStyle error(ColorScheme colorScheme) => new TextStyle(
color: CommonThemeUtils.isLight ? Colors.red.shade500 : Colors.red.shade400
);
TextStyle link(ColorScheme colorScheme) => new TextStyle(
color: CommonThemeUtils.isLight ? Colors.blue.shade700 : Colors.blue.shade300,
decoration: TextDecoration.underline
);
TextStyle regularBold(ColorScheme colorScheme) => new TextStyle(
color: CommonThemeUtils.defaultForeground,
fontWeight: FontWeight.w700
);
TextStyle regularItalic(ColorScheme colorScheme) => new TextStyle(
color: CommonThemeUtils.defaultForeground,
fontStyle: FontStyle.italic
);
TextStyle unimportantItalic(ColorScheme colorScheme) =>
unimportant(colorScheme).merge(new TextStyle(
fontStyle: FontStyle.italic
));
}
}
正在加载...
取消
保存