浏览代码

fix banner.cs

/siyaoH-1.17-PlatformMessage
guanghuispark 4 年前
当前提交
aa08396c
共有 2 个文件被更改,包括 25 次插入3 次删除
  1. 24
      com.unity.uiwidgets/Runtime/painting/binding.cs
  2. 4
      com.unity.uiwidgets/Runtime/widgets/banner.cs

24
com.unity.uiwidgets/Runtime/painting/binding.cs


using System;
using System.Collections.Generic;
using Unity.UIWidgets.async2;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.gestures;

public ImageCache imageCache => _imageCache;
ImageCache _imageCache;
readonly _SystemFontsNotifier _systemFonts = new _SystemFontsNotifier();
public _SystemFontsNotifier systemFonts {
get { return _systemFonts; }
}
protected virtual ImageCache createImageCache() {
return new ImageCache();

public static partial class painting_ {
public static ImageCache imageCache => PaintingBinding.instance.imageCache;
}
public class _SystemFontsNotifier : Listenable {
HashSet<VoidCallback> _systemFontsCallbacks = new HashSet<VoidCallback>();
void notifyListeners () {
foreach (VoidCallback callback in _systemFontsCallbacks) {
callback();
}
}
public void addListener(VoidCallback listener) {
_systemFontsCallbacks.Add(listener);
}
public void removeListener(VoidCallback listener) {
_systemFontsCallbacks.Remove(listener);
}
}
}

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


BannerLocation? location,
Color color = null,
TextStyle textStyle = null
) {
) : base (repaint: PaintingBinding.instance.systemFonts) {
D.assert(message != null);
D.assert(location != null);
this.color = color ?? BannerConstants._kColor;

base.debugFillProperties(properties);
properties.add(new StringProperty("message", message, showName: false));
properties.add(new EnumProperty<BannerLocation?>("location", location));
properties.add(new DiagnosticsProperty<Color>("color", color, showName: false));
properties.add(new ColorProperty("color", color, showName: false));
textStyle?.debugFillProperties(properties);
}
}

正在加载...
取消
保存