浏览代码

material fixes (7)

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
1701de87
共有 3 个文件被更改,包括 69 次插入82 次删除
  1. 139
      com.unity.uiwidgets/Runtime/material/slider_theme.cs
  2. 6
      com.unity.uiwidgets/Runtime/rendering/viewport.cs
  3. 6
      com.unity.uiwidgets/Runtime/widgets/page_view.cs

139
com.unity.uiwidgets/Runtime/material/slider_theme.cs


}
public abstract Size getPreferredSize(
bool? isEnabled,
bool? isDiscrete,
bool isEnabled,
bool isDiscrete,
TextPainter textPainter = null);
public abstract void paint(

Animation<float> enableAnimation = null,
bool? isDiscrete = null,
bool isDiscrete = false,
TextPainter labelPainter = null,
RenderBox parentBox = null,
SliderThemeData sliderTheme = null,

public abstract Size getPreferredSize(
SliderThemeData sliderTheme = null,
bool? isEnabled = null);
bool isEnabled = false);
public abstract void paint(
PaintingContext context,

Animation<float> enableAnimation = null,
Offset thumbCenter = null,
bool? isEnabled = null,
bool isEnabled = false,
TextDirection? textDirection = null);
public static readonly SliderTickMarkShape noTickMark = new _EmptySliderTickMarkShape();

RenderBox parentBox = null,
Offset offset = null,
SliderThemeData sliderTheme = null,
bool? isEnabled = null,
bool? isDiscrete = null);
bool isEnabled = false,
bool isDiscrete = false);
public abstract void paint(
PaintingContext context,

Animation<float> enableAnimation = null,
Offset thumbCenter = null,
bool? isEnabled = null,
bool? isDiscrete = null,
bool isEnabled = false,
bool isDiscrete = false,
TextDirection? textDirection = null
);
}

}
public abstract Size getPreferredSize(bool? isEnabled, bool? isDiscrete);
public abstract Size getPreferredSize(bool isEnabled, bool isDiscrete);
public abstract void paint(
PaintingContext context,

bool? isDiscrete = null,
bool? isEnabled = null,
bool isDiscrete = false,
bool isEnabled = false,
bool? isOnTop = null,
TextDirection? textDirection = null,
SliderThemeData sliderTheme = null,

Offset center,
Animation<float> activationAnimation = null,
Animation<float> enableAnimation = null,
bool? isDiscrete = null,
bool isDiscrete = false,
bool? isOnTop = null,
TextPainter labelPainter = null,
RenderBox parentBox = null,

public abstract Size getPreferredSize(
SliderThemeData sliderTheme = null,
bool? isEnabled = null
bool isEnabled = false
);
public abstract void paint(

Animation<float> enableAnimation = null,
Offset startThumbCenter = null,
Offset endThumbCenter = null,
bool? isEnabled = null,
bool isEnabled = false,
TextDirection? textDirection = null
);
}

RenderBox parentBox = null,
Offset offset = null,
SliderThemeData sliderTheme = null,
bool? isEnabled = null,
bool? isDiscrete = null
bool isEnabled = false,
bool isDiscrete = false
);
public abstract void paint(

Animation<float> enableAnimation = null,
Offset startThumbCenter = null,
Offset endThumbCenter = null,
bool? isEnabled = null,
bool? isDiscrete = null,
bool isEnabled = false,
bool isDiscrete = false,
TextDirection? textDirection = null
);
}

RenderBox parentBox = null,
Offset offset = null,
SliderThemeData sliderTheme = null,
bool? isEnabled = null,
bool? isDiscrete = null) {
bool isEnabled = false,
bool isDiscrete = false) {
D.assert(isEnabled != null);
D.assert(isDiscrete != null);
D.assert(parentBox != null);
D.assert(sliderTheme != null);
float thumbWidth = sliderTheme.thumbShape.getPreferredSize(isEnabled, isDiscrete).width;

SliderThemeData sliderTheme = null,
Animation<float> enableAnimation = null,
Offset thumbCenter = null,
bool? isEnabled = false,
bool? isDiscrete = false,
bool isEnabled = false,
bool isDiscrete = false,
TextDirection? textDirection = null) {
D.assert(context != null);
D.assert(offset != null);

D.assert(enableAnimation != null);
D.assert(textDirection != null);
D.assert(thumbCenter != null);
D.assert(isEnabled != null);
D.assert(isDiscrete != null);
if (sliderTheme.trackHeight == 0) {
return;

RenderBox parentBox = null,
Offset offset = null,
SliderThemeData sliderTheme = null,
bool? isEnabled = null,
bool? isDiscrete = null) {
bool isEnabled = false,
bool isDiscrete = false) {
D.assert(isEnabled != null);
D.assert(isDiscrete != null);
D.assert(parentBox != null);
D.assert(sliderTheme != null);
float thumbWidth = sliderTheme.thumbShape.getPreferredSize(isEnabled, isDiscrete).width;

SliderThemeData sliderTheme = null,
Animation<float> enableAnimation = null,
Offset thumbCenter = null,
bool? isEnabled = false,
bool? isDiscrete = false,
bool isEnabled = false,
bool isDiscrete = false,
TextDirection? textDirection = null) {
D.assert(context != null);
D.assert(offset != null);

RenderBox parentBox = null,
Offset offset = null,
SliderThemeData sliderTheme = null,
bool? isEnabled = false,
bool? isDiscrete = false
bool isEnabled = false,
bool isDiscrete = false
) {
offset = offset ?? Offset.zero;

D.assert(sliderTheme.overlayShape != null);
D.assert(isEnabled != null);
D.assert(isDiscrete != null);
float overlayWidth = sliderTheme.overlayShape.getPreferredSize(isEnabled, isDiscrete).width;
float trackHeight = sliderTheme.trackHeight.Value;

Animation<float> enableAnimation = null,
Offset startThumbCenter = null,
Offset endThumbCenter = null,
bool? isEnabled = false,
bool? isDiscrete = false,
bool isEnabled = false,
bool isDiscrete = false,
TextDirection? textDirection = null
) {
D.assert(context != null);

D.assert(enableAnimation != null);
D.assert(startThumbCenter != null);
D.assert(endThumbCenter != null);
D.assert(isEnabled != null);
D.assert(isDiscrete != null);
D.assert(textDirection != null);
ColorTween activeTrackColorTween = new ColorTween(begin: sliderTheme.disabledActiveTrackColor,

RenderBox parentBox = null,
Offset offset = null,
SliderThemeData sliderTheme = null,
bool? isEnabled = false,
bool? isDiscrete = false
bool isEnabled = false,
bool isDiscrete = false
) {
offset = offset ?? Offset.zero;

D.assert(sliderTheme.overlayShape != null);
D.assert(sliderTheme.trackHeight != null);
D.assert(isEnabled != null);
D.assert(isDiscrete != null);
float overlayWidth = sliderTheme.overlayShape.getPreferredSize(isEnabled, isDiscrete).width;
float trackHeight = sliderTheme.trackHeight.Value;

Animation<float> enableAnimation = null,
Offset startThumbCenter = null,
Offset endThumbCenter = null,
bool? isEnabled = false,
bool? isDiscrete = false,
bool isEnabled = false,
bool isDiscrete = false,
TextDirection? textDirection = null
) {
D.assert(context != null);

D.assert(enableAnimation != null);
D.assert(startThumbCenter != null);
D.assert(endThumbCenter != null);
D.assert(isEnabled != null);
D.assert(isDiscrete != null);
D.assert(textDirection != null);
ColorTween activeTrackColorTween = new ColorTween(begin: sliderTheme.disabledActiveTrackColor,

public override Size getPreferredSize(
SliderThemeData sliderTheme = null,
bool? isEnabled = null
bool isEnabled = false
D.assert(isEnabled != null);
return Size.fromRadius(tickMarkRadius ?? sliderTheme.trackHeight.Value / 2f);
}

SliderThemeData sliderTheme = null,
Animation<float> enableAnimation = null,
Offset thumbCenter = null,
bool? isEnabled = null,
bool isEnabled = false,
TextDirection? textDirection = null
) {
D.assert(context != null);

D.assert(enableAnimation != null);
D.assert(textDirection != null);
D.assert(thumbCenter != null);
D.assert(isEnabled != null);
Color begin = null;
Color end = null;

public override Size getPreferredSize(
SliderThemeData sliderTheme = null,
bool? isEnabled = false
bool isEnabled = false
D.assert(isEnabled != null);
return Size.fromRadius(tickMarkRadius ?? sliderTheme.trackHeight.Value / 2f);
}

Animation<float> enableAnimation = null,
Offset startThumbCenter = null,
Offset endThumbCenter = null,
bool? isEnabled = false,
bool isEnabled = false,
TextDirection? textDirection = null
) {
D.assert(context != null);

D.assert(enableAnimation != null);
D.assert(startThumbCenter != null);
D.assert(endThumbCenter != null);
D.assert(isEnabled != null);
D.assert(textDirection != null);
bool isBetweenThumbs = false;

class _EmptySliderTickMarkShape : SliderTickMarkShape {
public override Size getPreferredSize(
SliderThemeData sliderTheme = null,
bool? isEnabled = null) {
bool isEnabled = false) {
return Size.zero;
}

SliderThemeData sliderTheme = null,
Animation<float> enableAnimation = null,
Offset thumbCenter = null,
bool? isEnabled = null,
bool isEnabled = false,
TextDirection? textDirection = null) {
}
}

bool? isEnabled = null,
bool? isDiscrete = null,
bool isEnabled = false,
bool isDiscrete = false,
TextPainter textPainter = null) {
return Size.zero;
}

Offset center,
Animation<float> activationAnimation = null,
Animation<float> enableAnimation = null,
bool? isDiscrete = null,
bool isDiscrete = false,
TextPainter labelPainter = null,
RenderBox parentBox = null,
SliderThemeData sliderTheme = null,

}
public override Size getPreferredSize(bool? isEnabled, bool? isDiscrete, TextPainter textPainter = null) {
public override Size getPreferredSize(bool isEnabled, bool isDiscrete, TextPainter textPainter = null) {
return Size.fromRadius(isEnabled == true ? enabledThumbRadius : _disabledThumbRadius);
}

Offset center,
Animation<float> activationAnimation = null,
Animation<float> enableAnimation = null,
bool? isDiscrete = null,
bool isDiscrete = false,
TextPainter labelPainter = null,
RenderBox parentBox = null,
SliderThemeData sliderTheme = null,

get { return disabledThumbRadius ?? enabledThumbRadius; }
}
public override Size getPreferredSize(bool? isEnabled, bool? isDiscrete) {
public override Size getPreferredSize(bool isEnabled, bool isDiscrete) {
return Size.fromRadius(isEnabled == true ? enabledThumbRadius : _disabledThumbRadius);
}

Animation<float> activationAnimation = null,
Animation<float> enableAnimation = null,
bool? isDiscrete = false,
bool? isEnabled = false,
bool isDiscrete = false,
bool isEnabled = false,
bool? isOnTop = null,
TextDirection? textDirection = null,
SliderThemeData sliderTheme = null,

bool showValueIndicator = false;
switch (sliderTheme.showValueIndicator) {
case ShowValueIndicator.onlyForDiscrete:
showValueIndicator = isDiscrete.Value;
showValueIndicator = isDiscrete;
showValueIndicator = !isDiscrete.Value;
showValueIndicator = !isDiscrete;
break;
case ShowValueIndicator.always:
showValueIndicator = true;

public readonly float overlayRadius;
public override Size getPreferredSize(bool? isEnabled, bool? isDiscrete, TextPainter textPainter = null) {
public override Size getPreferredSize(bool isEnabled, bool isDiscrete, TextPainter textPainter = null) {
return Size.fromRadius(overlayRadius);
}

Animation<float> activationAnimation = null,
Animation<float> enableAnimation = null,
bool? isDiscrete = null,
bool isDiscrete = false,
TextPainter labelPainter = null,
RenderBox parentBox = null,
SliderThemeData sliderTheme = null,

static readonly _PaddleSliderTrackShapePathPainter _pathPainter = new _PaddleSliderTrackShapePathPainter();
public override Size getPreferredSize(
bool? isEnabled,
bool? isDiscrete,
bool isEnabled,
bool isDiscrete,
TextPainter labelPainter = null) {
D.assert(labelPainter != null);
return _pathPainter.getPreferredSize(isEnabled, isDiscrete, labelPainter);

Offset center,
Animation<float> activationAnimation = null,
Animation<float> enableAnimation = null,
bool? isDiscrete = null,
bool isDiscrete = false,
TextPainter labelPainter = null,
RenderBox parentBox = null,
SliderThemeData sliderTheme = null,

Offset center,
Animation<float> activationAnimation = null,
Animation<float> enableAnimation = null,
bool? isDiscrete = null,
bool isDiscrete = false,
bool? isOnTop = null,
TextPainter labelPainter = null,
RenderBox parentBox = null,

const bool _debuggingLabelLocation = false;
public Size getPreferredSize(
bool? isEnabled,
bool? isDiscrete,
bool isEnabled,
bool isDiscrete,
TextPainter labelPainter
) {
D.assert(labelPainter != null);

6
com.unity.uiwidgets/Runtime/rendering/viewport.cs


AxisDirection axisDirection = AxisDirection.down,
AxisDirection crossAxisDirection = AxisDirection.right,
ViewportOffset offset = null,
float cacheExtent = RenderViewportUtils.defaultCacheExtent,
float? cacheExtent = null,
D.assert(cacheExtentStyle == CacheExtentStyle.pixel);
D.assert(cacheExtent != null || cacheExtentStyle == CacheExtentStyle.pixel);
_cacheExtent = cacheExtent;
_cacheExtent = cacheExtent ?? RenderViewportUtils.defaultCacheExtent;
_cacheExtentStyle = cacheExtentStyle;
}

6
com.unity.uiwidgets/Runtime/widgets/page_view.cs


}
public override bool applyViewportDimension(float viewportDimension) {
float oldViewportDimensions = this.viewportDimension;
float oldViewportDimensions = 0.0f;
if (haveDimensions) {
oldViewportDimensions = this.viewportDimension;
}
bool result = base.applyViewportDimension(viewportDimension);
float? oldPixels = null;
if (havePixels) {

正在加载...
取消
保存