2022-06-03 00:05:15 +00:00
|
|
|
// This file Copyright © 2007-2022 Transmission authors and contributors.
|
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
|
|
|
|
|
|
|
#import "GroupPopUpButtonCell.h"
|
|
|
|
|
2022-10-19 19:28:21 +00:00
|
|
|
static CGFloat const kFrameInset = 2.0;
|
2022-06-03 00:05:15 +00:00
|
|
|
|
|
|
|
@implementation GroupPopUpButtonCell
|
|
|
|
|
|
|
|
- (void)drawImageWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
|
|
|
|
{
|
|
|
|
NSRect imageFrame = cellFrame;
|
2022-10-19 19:28:21 +00:00
|
|
|
imageFrame.origin.x -= kFrameInset;
|
2022-06-03 00:05:15 +00:00
|
|
|
|
|
|
|
[super drawImageWithFrame:imageFrame inView:controlView];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)drawTitleWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
|
|
|
|
{
|
|
|
|
NSRect textFrame = cellFrame;
|
2022-10-19 19:28:21 +00:00
|
|
|
textFrame.origin.y += kFrameInset / 2;
|
2022-06-03 00:05:15 +00:00
|
|
|
|
|
|
|
[super drawTitleWithFrame:textFrame inView:controlView];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|