mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-15 17:22:25 +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;
|
||||
|
||||
- (void)setImage:(NSImage *)image;
|
||||
@property (nonatomic, strong) NSImage *image;
|
||||
|
||||
@end
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
[self setImage:image forSegment:MPContextButtonSegmentButton];
|
||||
}
|
||||
|
||||
- (NSImage *)image {
|
||||
return [self imageForSegment:MPContextButtonSegmentButton];
|
||||
}
|
||||
|
||||
- (void)showContextMenu:(id)sender {
|
||||
NSPoint point = self.frame.origin;
|
||||
point.x = [self.cell widthForSegment:MPContextButtonSegmentButton];
|
||||
|
||||
Reference in New Issue
Block a user