Replace preprocessor defines with constants in objc code (#3974)

This commit is contained in:
Dmitry Serov
2022-10-19 20:28:21 +01:00
committed by GitHub
parent 8cad9675d8
commit 3a8dc9d203
35 changed files with 703 additions and 642 deletions

View File

@@ -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];
}