浏览代码

Merge pull request #59 from Unity-Technologies/fix_runtime_issues

Fix runtime issues
/siyaoH-1.17-PlatformMessage
GitHub 4 年前
当前提交
e12a5790
共有 3 个文件被更改,包括 27 次插入49 次删除
  1. 72
      Samples/UIWidgetsSamples_2019_4/Assets/Script/TextTest.cs
  2. 2
      com.unity.uiwidgets/Runtime/rendering/sliver_padding.cs
  3. 2
      com.unity.uiwidgets/Runtime/widgets/sliver_fill.cs

72
Samples/UIWidgetsSamples_2019_4/Assets/Script/TextTest.cs


using UIWidgetsGallery.gallery;
using Color = Unity.UIWidgets.ui.Color;
using Random = UnityEngine.Random;
public class UIWidgetsExample : UIWidgetsPanel
public class TextTest : UIWidgetsPanel
class MyApp : StatelessWidget
{
public override Widget build(BuildContext context)

);
// return new CupertinoPageScaffold(
// child: new Center(
// child: new CupertinoButton(
// child: new Text(
// "THIS IS TAB #"
// ),
// onPressed: () =>
// {
// Navigator.of(context).push(
// new CupertinoPageRoute(builder: (contex3) =>
// {
// return
// new CupertinoAlertDemo();
// })
// );
// }
// )
// //new Text("hello world!", style: CupertinoTheme.of(context).textTheme.navTitleTextStyle)
// )
// //backgroundColor: Colors.brown
// );
List<BottomNavigationBarItem> items = new List<BottomNavigationBarItem>();
return new CupertinoPageScaffold(
child: new Center(
child: new CupertinoButton(
child: new Text(
"THIS IS TAB #",
style: new TextStyle(color: Color.fromARGB(255, 255, 0, 0))
),
onPressed: () =>
{
Navigator.of(context).push(
new CupertinoPageRoute(builder: (contex3) =>
{
return
new Container(color: Color.fromARGB(255, 0, 255, 0));
})
);
}
)//,
//new Text("hello world!", style: CupertinoTheme.of(context).textTheme.navTitleTextStyle)
),
backgroundColor: Color.fromARGB(255, 255, 255, 0)
);
/*List<BottomNavigationBarItem> items = new List<BottomNavigationBarItem>();
items.Add(new BottomNavigationBarItem(
icon: new Icon(CupertinoIcons.bell),
title: new Text("views")

middle: (index == 0) ? new Text("views") : new Text("articles")
),
child: new Center(
child: new CupertinoButton(
child: new Text(
"THIS IS TAB #",

//.copyWith(fontSize:32)
),
onPressed: () =>
{
Navigator.of(contex1).push(

}
);
})
);
);*/
public override Widget build(BuildContext context)
{
return new CupertinoPageScaffold(

);
}
}
}

2
com.unity.uiwidgets/Runtime/rendering/sliver_padding.cs


paintExtent: paintExtent,
layoutExtent: Mathf.Min(mainAxisPaddingPaintExtent + childLayoutGeometry.layoutExtent, paintExtent),
cacheExtent: Mathf.Min(mainAxisPaddingCacheExtent + childLayoutGeometry.cacheExtent, constraints.remainingCacheExtent),
maxPaintExtent: mainAxisPadding ?? 0.0f + childLayoutGeometry.maxPaintExtent,
maxPaintExtent: (mainAxisPadding ?? 0.0f) + childLayoutGeometry.maxPaintExtent,
hitTestExtent: Mathf.Max(
mainAxisPaddingPaintExtent + childLayoutGeometry.paintExtent,
beforePaddingPaintExtent + childLayoutGeometry.hitTestExtent

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


float _viewportFraction;
public EdgeInsets resolvedPadding {
protected override EdgeInsets resolvedPadding {
get {
return _resolvedPadding;
}

正在加载...
取消
保存