diff --git a/app/os_android.go b/app/os_android.go index c77b9cf9..1d86c39a 100644 --- a/app/os_android.go +++ b/app/os_android.go @@ -217,10 +217,10 @@ func onFocusChange(env *C.JNIEnv, class C.jclass, view C.jlong, focus C.jboolean func onWindowInsets(env *C.JNIEnv, class C.jclass, view C.jlong, top, right, bottom, left C.jint) { w := views[view] w.insets = Insets{ - Top: ui.Px(float32(top)), - Right: ui.Px(float32(right)), - Bottom: ui.Px(float32(bottom)), - Left: ui.Px(float32(left)), + Top: unit.Px(float32(top)), + Right: unit.Px(float32(right)), + Bottom: unit.Px(float32(bottom)), + Left: unit.Px(float32(left)), } if w.stage >= StageRunning { w.draw(true) diff --git a/app/os_ios.go b/app/os_ios.go index 65dd198e..adec571e 100644 --- a/app/os_ios.go +++ b/app/os_ios.go @@ -86,10 +86,10 @@ func onDraw(view C.CFTypeRef, dpi, sdpi, width, height C.CGFloat, sync C.int, to Y: int(height + .5), }, Insets: Insets{ - Top: ui.Px(float32(top)), - Right: ui.Px(float32(right)), - Bottom: ui.Px(float32(bottom)), - Left: ui.Px(float32(left)), + Top: unit.Px(float32(top)), + Right: unit.Px(float32(right)), + Bottom: unit.Px(float32(bottom)), + Left: unit.Px(float32(left)), }, Config: Config{ pxPerDp: float32(dpi) * inchPrDp,