diff options
author | Jesse Crocker <jesse@gaiagps.com> | 2017-03-01 11:15:11 -0700 |
---|---|---|
committer | Jesse Crocker <jesse@gaiagps.com> | 2017-03-01 11:15:11 -0700 |
commit | 9e8dc9a9e3e86adb9987ae69766cc42c7d9efece (patch) | |
tree | f5f0abd4d342c89ad0405d01969f9d6caecc1c90 /platform/macos/src/MGLAttributionButton.mm | |
parent | 16fb0672e64a72b7400c321d55858b73cd5d8c3f (diff) | |
parent | f28d75dccd9bf4a7615df87faccc5cf5eff8df89 (diff) | |
download | qtlocation-mapboxgl-9e8dc9a9e3e86adb9987ae69766cc42c7d9efece.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/custom-vector-source
Diffstat (limited to 'platform/macos/src/MGLAttributionButton.mm')
-rw-r--r-- | platform/macos/src/MGLAttributionButton.mm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/macos/src/MGLAttributionButton.mm b/platform/macos/src/MGLAttributionButton.mm index ed8bb18a66..3df415f60d 100644 --- a/platform/macos/src/MGLAttributionButton.mm +++ b/platform/macos/src/MGLAttributionButton.mm @@ -10,25 +10,25 @@ if (self = [super initWithFrame:NSZeroRect]) { self.bordered = NO; self.bezelStyle = NSRegularSquareBezelStyle; - + // Extract any prefix consisting of intellectual property symbols. NSScanner *scanner = [NSScanner scannerWithString:info.title.string]; NSCharacterSet *symbolSet = [NSCharacterSet characterSetWithCharactersInString:@"©℗®℠™ &"]; NSString *symbol; [scanner scanCharactersFromSet:symbolSet intoString:&symbol]; - + // Remove the underline from the symbol for aesthetic reasons. NSMutableAttributedString *title = info.title.mutableCopy; [title removeAttribute:NSUnderlineStyleAttributeName range:NSMakeRange(0, symbol.length)]; - + self.attributedTitle = title; [self sizeToFit]; - + _URL = info.URL; if (_URL) { self.toolTip = _URL.absoluteString; } - + self.target = self; self.action = @selector(openURL:); } |