浏览代码

temporary fix screen rotation safe-area issue

/fix_alignment_issue
Xingwei Zhu 3 年前
当前提交
38e5f140
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 3
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs
  2. 4
      com.unity.uiwidgets/Runtime/ui/hooks.cs

3
com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs


dpr: _currentDevicePixelRatio)) {
_wrapper.OnDisplayMetricsChanged(width: _currentWidth, height: _currentHeight,
dpr: _currentDevicePixelRatio);
_handleViewMetricsChanged(null, null);
texture = _wrapper.renderTexture;
}
}

4
com.unity.uiwidgets/Runtime/ui/hooks.cs


window.physicalSize = new Size(width, height);
window.physicalDepth = depth;
window.viewPadding = new WindowPadding(
/*window.viewPadding = new WindowPadding(
top: viewPaddingTop,
right: viewPaddingRight,
bottom: viewPaddingBottom,

top: Mathf.Max(0.0f, viewPaddingTop - viewInsetTop),
right: Mathf.Max(0.0f, viewPaddingRight - viewInsetRight),
bottom: Mathf.Max(0.0f, viewPaddingBottom - viewInsetBottom),
left: Mathf.Max(0.0f, viewPaddingLeft - viewInsetLeft));
left: Mathf.Max(0.0f, viewPaddingLeft - viewInsetLeft));*/
window.systemGestureInsets = new WindowPadding(
top: Mathf.Max(0.0f, systemGestureInsetTop),

正在加载...
取消
保存