浏览代码

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

# Conflicts:
#	Assets/UIWidgets/foundation/diagnostics.cs
#	Assets/UIWidgets/widgets/basic.cs
#	Assets/UIWidgets/widgets/text.cs
#	Assets/UIWidgets/widgets/text.cs.meta
/main
fzhangtj 6 年前
当前提交
7104076c
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 4
      Assets/UIWidgets/widgets/text.cs

4
Assets/UIWidgets/widgets/text.cs


using UIWidgets.ui;
using TextStyle = UIWidgets.painting.TextStyle;
namespace UIWidgets.widgets
{
public class DefaultTextStyle : InheritedWidget

bool? softWrap, TextOverflow? overflow, int? maxLines, Widget child)
{
D.assert(child != null);
return new Builder((context =>
return new Builder(builder: (context =>
{
var parent = DefaultTextStyle.of(context);
return new DefaultTextStyle(

return new RichText(
textAlign: textAlign ?? defaultTextStyle.textAlign,
textDirection: textDirection,
softWrap: softWrap ?? defaultTextStyle.softWrap,
overflow: overflow ?? defaultTextStyle.overflow,
textScaleFactor: textScaleFactor ?? 1.0, // MediaQuery.textScaleFactorOf(context), todo

正在加载...
取消
保存