summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/styled_text_field_test_helper.mm
blob: 20f566df98874f795d45ed327605900de2900ceb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import <Cocoa/Cocoa.h>
#import "chrome/browser/ui/cocoa/styled_text_field_test_helper.h"

@implementation StyledTextFieldTestCell
@synthesize leftMargin = leftMargin_;
@synthesize rightMargin = rightMargin_;

- (NSRect)textFrameForFrame:(NSRect)frame {
  NSRect textFrame = [super textFrameForFrame:frame];
  textFrame.origin.x += leftMargin_;
  textFrame.size.width -= (leftMargin_ + rightMargin_);
  return textFrame;
}
@end