maps icon indicating copy to clipboard operation
maps copied to clipboard

Content insets uses the system font size

Open jorpiell opened this issue 3 years ago • 0 comments

Describe the bug

You can add a content insets to the MapView to move the map center to other place. But when you do this, the new center uses the system font size (instead of the screen size) in order to calculate the new map center and it is easy to check that the map center is not in the right position.

To Reproduce

  • Create a MapView with content insets and add a geometry in the centre of the map.
  • Check the position of the geometry. Screenshot 2022-04-04 at 09 43 05
  • In system preferences, update the system font size
  • Check the map again. The geometry is not in the same position Screenshot 2022-04-04 at 09 43 13

Expected behavior

  • The system font size has not to be related with the content insets

Additional context

  • This problem has been fixed. A PR will be created soon.
  • To calculate the center of the new map, is using scaledDensity instead of density

jorpiell avatar Apr 04 '22 07:04 jorpiell