浏览代码

fix hide scrollbar when scrollview content is not full.

/main
wangshuang 5 年前
当前提交
dc7daa27
共有 1 个文件被更改,包括 6 次插入7 次删除
  1. 13
      Runtime/widgets/scrollbar.cs

13
Runtime/widgets/scrollbar.cs


using System;
using Unity.UIWidgets.animation;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;

this.minLength * (((inside / viewport) - 0.8f) / 0.2f)
);
}
}
float fractionPast = before / (before + after);
float thumbOffset = (before + after > 0.0)
? fractionPast * (viewport - thumbExtent - 2 * this.mainAxisMargin) + this.mainAxisMargin
: this.mainAxisMargin;
float fractionPast = before / (before + after);
float thumbOffset = (before + after > 0.0)
? fractionPast * (viewport - thumbExtent - 2 * this.mainAxisMargin) + this.mainAxisMargin
: this.mainAxisMargin;
painter(canvas, size, thumbOffset, thumbExtent);
painter(canvas, size, thumbOffset, thumbExtent);
}
}
public override void dispose() {

正在加载...
取消
保存