李卓原

fix #150

@@ -34,8 +34,8 @@ class ScreenUtil { @@ -34,8 +34,8 @@ class ScreenUtil {
34 _pixelRatio = window.devicePixelRatio; 34 _pixelRatio = window.devicePixelRatio;
35 _screenWidth = window.physicalSize.width / _pixelRatio; 35 _screenWidth = window.physicalSize.width / _pixelRatio;
36 _screenHeight = window.physicalSize.height / _pixelRatio; 36 _screenHeight = window.physicalSize.height / _pixelRatio;
37 - _statusBarHeight = window.padding.top;  
38 - _bottomBarHeight = window.padding.bottom; 37 + _statusBarHeight = window.padding.top / _pixelRatio;
  38 + _bottomBarHeight = window.padding.bottom / _pixelRatio;
39 _textScaleFactor = window.textScaleFactor; 39 _textScaleFactor = window.textScaleFactor;
40 } 40 }
41 41
@@ -119,11 +119,8 @@ class ScreenUtil { @@ -119,11 +119,8 @@ class ScreenUtil {
119 ///Font size adaptation method 119 ///Font size adaptation method
120 ///@param [fontSize] The size of the font on the UI design, in px. 120 ///@param [fontSize] The size of the font on the UI design, in px.
121 ///@param [allowFontScaling] 121 ///@param [allowFontScaling]
122 - num setSp(num fontSize, {bool allowFontScalingSelf}) =>  
123 - allowFontScalingSelf == null  
124 - ? (allowFontScaling  
125 - ? (fontSize * scaleText)  
126 - : ((fontSize * scaleText) / _textScaleFactor)) 122 + num setSp(num fontSize, {bool allowFontScalingSelf}) => allowFontScalingSelf == null
  123 + ? (allowFontScaling ? (fontSize * scaleText) : ((fontSize * scaleText) / _textScaleFactor))
127 : (allowFontScalingSelf 124 : (allowFontScalingSelf
128 ? (fontSize * scaleText) 125 ? (fontSize * scaleText)
129 : ((fontSize * scaleText) / _textScaleFactor)); 126 : ((fontSize * scaleText) / _textScaleFactor));