OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "ios/chrome/browser/ui/fancy_ui/primary_action_button.h" | 5 #import "ios/chrome/browser/ui/fancy_ui/primary_action_button.h" |
6 | 6 |
7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" | 7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" |
8 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
9 @implementation PrimaryActionButton | 13 @implementation PrimaryActionButton |
10 | 14 |
11 - (id)initWithFrame:(CGRect)frame { | 15 - (id)initWithFrame:(CGRect)frame { |
12 self = [super initWithFrame:frame]; | 16 self = [super initWithFrame:frame]; |
13 if (self) | 17 if (self) |
14 [self initializeStyling]; | 18 [self initializeStyling]; |
15 return self; | 19 return self; |
16 } | 20 } |
17 | 21 |
18 - (id)initWithCoder:(NSCoder*)aDecoder { | 22 - (id)initWithCoder:(NSCoder*)aDecoder { |
(...skipping 14 matching lines...) Expand all Loading... |
33 self.inkColor = | 37 self.inkColor = |
34 [[[MDCPalette cr_bluePalette] tint300] colorWithAlphaComponent:0.5f]; | 38 [[[MDCPalette cr_bluePalette] tint300] colorWithAlphaComponent:0.5f]; |
35 [self setBackgroundColor:[[MDCPalette cr_bluePalette] tint500] | 39 [self setBackgroundColor:[[MDCPalette cr_bluePalette] tint500] |
36 forState:UIControlStateNormal]; | 40 forState:UIControlStateNormal]; |
37 [self setBackgroundColor:[UIColor colorWithWhite:0.6f alpha:1.0f] | 41 [self setBackgroundColor:[UIColor colorWithWhite:0.6f alpha:1.0f] |
38 forState:UIControlStateDisabled]; | 42 forState:UIControlStateDisabled]; |
39 self.customTitleColor = [UIColor whiteColor]; | 43 self.customTitleColor = [UIColor whiteColor]; |
40 } | 44 } |
41 | 45 |
42 @end | 46 @end |
OLD | NEW |