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 17:11:34 -0800 |
commit | 5086c76997fdc073816632688da2e8850aff510b (patch) | |
tree | 4a46389adba8edda2806005773ebc73b42db3b75 /platform/macos/src/MGLMapView.mm | |
parent | 06a0c036057fccc481657477985a0d4b8c96cbc2 (diff) | |
download | qtlocation-mapboxgl-5086c76997fdc073816632688da2e8850aff510b.tar.gz |
[macos] Fixed logo view distortion on macOS High Sierra
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.
Diffstat (limited to 'platform/macos/src/MGLMapView.mm')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 8df6e2969d..c2c13320c7 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"); |