mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
Replace preprocessor defines with constants in objc code (#3974)
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
|
||||
#import "GroupPopUpButtonCell.h"
|
||||
|
||||
#define FRAME_INSET 2.0
|
||||
static CGFloat const kFrameInset = 2.0;
|
||||
|
||||
@implementation GroupPopUpButtonCell
|
||||
|
||||
- (void)drawImageWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
|
||||
{
|
||||
NSRect imageFrame = cellFrame;
|
||||
imageFrame.origin.x -= FRAME_INSET;
|
||||
imageFrame.origin.x -= kFrameInset;
|
||||
|
||||
[super drawImageWithFrame:imageFrame inView:controlView];
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
- (void)drawTitleWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
|
||||
{
|
||||
NSRect textFrame = cellFrame;
|
||||
textFrame.origin.y += FRAME_INSET / 2;
|
||||
textFrame.origin.y += kFrameInset / 2;
|
||||
|
||||
[super drawTitleWithFrame:textFrame inView:controlView];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user