|
@@ -218,10 +218,10 @@ NSPopoverDelegate>
|
|
|
|
|
|
CGFloat buttonWidth = CGRectGetMaxX(self.button.frame);
|
|
|
NSRect btnRect = [self.button.attributedTitle boundingRectWithSize:CGSizeMake(MAXFLOAT, CGRectGetHeight(self.button.frame)) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading];
|
|
|
- if (fabs(buttonWidth-btnRect.size.width)>50) {
|
|
|
-// buttonWidth = btnRect.size.width + 10;
|
|
|
- buttonWidth += 10;
|
|
|
- }
|
|
|
+// if (fabs(buttonWidth-btnRect.size.width)>50) {
|
|
|
+ buttonWidth = btnRect.size.width + 10;
|
|
|
+// buttonWidth += 10;
|
|
|
+// }
|
|
|
|
|
|
CGFloat officeWidth = CGRectGetMaxX(self.officeButton.frame);
|
|
|
NSRect officeRect = [self.officeButton.attributedTitle boundingRectWithSize:CGSizeMake(MAXFLOAT, CGRectGetHeight(self.officeButton.frame)) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading];
|
|
@@ -474,10 +474,10 @@ NSPopoverDelegate>
|
|
|
|
|
|
buttonWidth = CGRectGetWidth(self.button.frame);
|
|
|
NSRect btnRect = [self.button.attributedTitle boundingRectWithSize:CGSizeMake(MAXFLOAT, CGRectGetHeight(self.button.frame)) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading];
|
|
|
- if (fabs(buttonWidth-btnRect.size.width)>50) {
|
|
|
-// buttonWidth = btnRect.size.width + 10;
|
|
|
- buttonWidth += 10;
|
|
|
- }
|
|
|
+// if (fabs(buttonWidth-btnRect.size.width)>50) {
|
|
|
+ buttonWidth = btnRect.size.width + 10;
|
|
|
+// buttonWidth += 10;
|
|
|
+// }
|
|
|
if (KMAdvertisementManager.manager.info.topRightInfoContent != nil) {
|
|
|
if (KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject != nil) {
|
|
|
buttonWidth += 10;
|