1 | //␊ |
2 | // CenterTextField.mm␊ |
3 | // ChameleonPrefPane␊ |
4 | //␊ |
5 | // Created by Rekursor on 11/10/11.␊ |
6 | //␊ |
7 | ␊ |
8 | #import "CenterTextFieldCell.h"␊ |
9 | ␊ |
10 | //--------------------------------------------------------------------------␊ |
11 | @implementation CenteredTextFieldCell␊ |
12 | //--------------------------------------------------------------------------␊ |
13 | - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView␊ |
14 | {␊ |
15 | NSSize contentSize = [self cellSize];␊ |
16 | cellFrame.origin.y += (cellFrame.size.height - contentSize.height) / 2.0;␊ |
17 | cellFrame.size.height = contentSize.height;␊ |
18 | ␊ |
19 | [super drawInteriorWithFrame:cellFrame inView:controlView];␊ |
20 | }␊ |
21 | ␊ |
22 | @end␊ |
23 | ␊ |
24 | ␊ |
25 | |