diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-11-30 10:49:18 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-11-30 10:49:18 -0800 |
commit | ae1ae6714adbd1f19ea55bfd5e783673463e3b68 (patch) | |
tree | afd129275b36c6d8930746680e2e0a6d1ac7285f | |
parent | 787c782749966e89a7da485eae99820c249e1525 (diff) | |
download | qtlocation-mapboxgl-upstream/1ec5-macos-logo-unsquish-10475.tar.gz |
[macos] Fixed logo view distortion on macOS High Sierraupstream/1ec5-macos-logo-unsquish-10475
Only the logo view’s baseline is aligned to the attribution view’s baseline; the X-height doesn’t need to be aligned. Previously, macOS ignored the X-height constraint inferred from the alignment rect, but now it honors it in addition to the baseline.
-rw-r--r-- | platform/macos/CHANGELOG.md | 1 | ||||
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 418b3b2006..4cd8c0bc13 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -33,6 +33,7 @@ ### Other changes * Added a Bulgarian localization. ([#10309](https://github.com/mapbox/mapbox-gl-native/pull/10309)) +* Fixed distortion in the logo view on macOS 10.13 High Sierra. ([#10606](https://github.com/mapbox/mapbox-gl-native/pull/10606)) * Fixed an issue that could cause line label rendering glitches when the line geometry is projected to a point behind the plane of the camera. ([#9865](https://github.com/mapbox/mapbox-gl-native/pull/9865)) * Fixed an issue that could cause a crash when using `-[MGLMapView flyToCamera:completionHandler:]` and related methods with zoom levels at or near the maximum value. ([#9381](https://github.com/mapbox/mapbox-gl-native/pull/9381)) diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 8df6f4545d..e81d2f741d 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -371,7 +371,7 @@ public: NSImage *logoImage = [[NSImage alloc] initWithContentsOfFile: [[NSBundle mgl_frameworkBundle] pathForResource:@"mapbox" ofType:@"pdf"]]; // Account for the image’s built-in padding when aligning other controls to the logo. - logoImage.alignmentRect = NSInsetRect(logoImage.alignmentRect, 0, 3); + logoImage.alignmentRect = NSOffsetRect(logoImage.alignmentRect, 0, 3); _logoView.image = logoImage; _logoView.translatesAutoresizingMaskIntoConstraints = NO; _logoView.accessibilityTitle = NSLocalizedStringWithDefaultValue(@"MAP_A11Y_TITLE", nil, nil, @"Mapbox", @"Accessibility title"); |