[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.
This commit is contained in:
committed by
Minh Nguyễn
parent
06a0c03605
commit
5086c76997
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user