diff --git a/ui/app/app.go b/ui/app/app.go index 139c992f..454156e9 100644 --- a/ui/app/app.go +++ b/ui/app/app.go @@ -15,7 +15,7 @@ type Event interface { } type Draw struct { - Config *ui.Config + Config ui.Config Size image.Point // Whether this draw is system generated // and needs a complete frame before diff --git a/ui/app/os_android.go b/ui/app/os_android.go index d416ad1b..ab73ce2f 100644 --- a/ui/app/os_android.go +++ b/ui/app/os_android.go @@ -275,7 +275,7 @@ func (w *window) draw(sync bool) { X: int(width), Y: int(height), }, - Config: &ui.Config{ + Config: ui.Config{ PxPerDp: ppdp, PxPerSp: w.fontScale * ppdp, Now: time.Now(), diff --git a/ui/app/os_ios.go b/ui/app/os_ios.go index fabc7911..c410e8a1 100644 --- a/ui/app/os_ios.go +++ b/ui/app/os_ios.go @@ -83,7 +83,7 @@ func onDraw(view C.CFTypeRef, dpi, sdpi, width, height C.CGFloat, sync C.int) { X: int(width + .5), Y: int(height + .5), }, - Config: &ui.Config{ + Config: ui.Config{ PxPerDp: float32(dpi) * inchPrDp, PxPerSp: float32(sdpi) * inchPrDp, Now: time.Now(), diff --git a/ui/app/os_js.go b/ui/app/os_js.go index b27f73e5..29f2b3fb 100644 --- a/ui/app/os_js.go +++ b/ui/app/os_js.go @@ -341,7 +341,7 @@ func (w *window) draw(sync bool) { X: width, Y: height, }, - Config: &cfg, + Config: cfg, sync: sync, }) } diff --git a/ui/app/os_macos.go b/ui/app/os_macos.go index c9d4b398..39f87c53 100644 --- a/ui/app/os_macos.go +++ b/ui/app/os_macos.go @@ -149,7 +149,7 @@ func (w *window) draw(sync bool) { X: width, Y: height, }, - Config: &cfg, + Config: cfg, sync: sync, }) } diff --git a/ui/app/os_wayland.go b/ui/app/os_wayland.go index c2001761..a5438642 100644 --- a/ui/app/os_wayland.go +++ b/ui/app/os_wayland.go @@ -1050,7 +1050,7 @@ func (w *window) draw(sync bool) { X: width, Y: height, }, - Config: &cfg, + Config: cfg, sync: sync, }) } diff --git a/ui/app/os_windows.go b/ui/app/os_windows.go index fdea1d0c..78fab8cb 100644 --- a/ui/app/os_windows.go +++ b/ui/app/os_windows.go @@ -487,14 +487,14 @@ func convertKeyCode(code uintptr) (rune, bool) { return r, true } -func configForDC(hdc syscall.Handle) *ui.Config { +func configForDC(hdc syscall.Handle) ui.Config { dpi := getDeviceCaps(hdc, _LOGPIXELSX) ppdp := float32(dpi) * inchPrDp * monitorScale // Force a minimum density to keep text legible and to handle bogus output geometry. if ppdp < minDensity { ppdp = minDensity } - return &ui.Config{ + return ui.Config{ PxPerDp: ppdp, PxPerSp: ppdp, }