mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-16 20:59:38 +00:00
Use property instead of method
This commit is contained in:
@@ -31,7 +31,6 @@ typedef NS_ENUM(NSUInteger, MPContextButtonSegment) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@property (nonatomic, strong) NSMenu *contextMenu;
|
@property (nonatomic, strong) NSMenu *contextMenu;
|
||||||
|
@property (nonatomic, strong) NSImage *image;
|
||||||
- (void)setImage:(NSImage *)image;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -91,6 +91,10 @@
|
|||||||
[self setImage:image forSegment:MPContextButtonSegmentButton];
|
[self setImage:image forSegment:MPContextButtonSegmentButton];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSImage *)image {
|
||||||
|
return [self imageForSegment:MPContextButtonSegmentButton];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)showContextMenu:(id)sender {
|
- (void)showContextMenu:(id)sender {
|
||||||
NSPoint point = self.frame.origin;
|
NSPoint point = self.frame.origin;
|
||||||
point.x = [self.cell widthForSegment:MPContextButtonSegmentButton];
|
point.x = [self.cell widthForSegment:MPContextButtonSegmentButton];
|
||||||
|
|||||||
Reference in New Issue
Block a user