|
@@ -295,6 +295,23 @@ NSPopoverDelegate>
|
|
|
type == KMUserScenarioTypeDmg_type45 ||
|
|
|
type == KMUserScenarioTypeDmg_type48) {
|
|
|
[self.button setTitleColor:[NSColor whiteColor]];
|
|
|
+
|
|
|
+ if (KMAdvertisementManager.manager.info.topRightInfoContent != nil) {
|
|
|
+ if (KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject != nil) {
|
|
|
+ KMAdvertisementItemInfo *info = KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject;
|
|
|
+ NSString *name = [KMAdvertisementModelTransition transitionLanguageWithLangeuage:info.name];
|
|
|
+ self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(name, nil)];
|
|
|
+
|
|
|
+ NSURL *url = [NSURL URLWithString: [KMAdvertisementModelTransition transitionImagePathWithImage:info.image highlight: YES]];
|
|
|
+ __weak typeof(self)weakSelf = self;
|
|
|
+ NSImage * img = [KMAdvertisementImage imageWithURLWithUrl:url completion:^(NSImage *image) {
|
|
|
+ if (image != nil) {
|
|
|
+ weakSelf.bgImg.image = image;
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
self.bgImg.hidden = NO;
|
|
|
self.button.hidden = NO;
|
|
|
self.button.frame = CGRectMake(totalWidth, kbottomGap, buttonWidth, self.view.frame.size.height -2 *kbottomGap);
|