device_ios.go 312 B

1234567891011121314151617
  1. //go:build ios
  2. // +build ios
  3. package mobile
  4. import "fyne.io/fyne/v2"
  5. const tapYOffset = -12.0 // to compensate for how we hold our fingers on the device
  6. func (*device) SystemScaleForWindow(_ fyne.Window) float32 {
  7. if currentDPI >= 450 {
  8. return 3
  9. } else if currentDPI >= 340 {
  10. return 2.5
  11. }
  12. return 2
  13. }