Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: ios/chrome/browser/ui/fancy_ui/primary_action_button.mm

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/ui/fancy_ui/primary_action_button.h"
6
7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
8
9 @implementation PrimaryActionButton
10
11 - (id)initWithFrame:(CGRect)frame {
12 self = [super initWithFrame:frame];
13 if (self)
14 [self initializeStyling];
15 return self;
16 }
17
18 - (id)initWithCoder:(NSCoder*)aDecoder {
19 self = [super initWithCoder:aDecoder];
20 if (self)
21 [self initializeStyling];
22 return self;
23 }
24
25 - (void)awakeFromNib {
26 [super awakeFromNib];
27 [self initializeStyling];
28 }
29
30 - (void)initializeStyling {
31 self.hasOpaqueBackground = YES;
32 self.underlyingColorHint = [UIColor whiteColor];
33 self.inkColor =
34 [[[MDCPalette cr_bluePalette] tint300] colorWithAlphaComponent:0.5f];
35 [self setBackgroundColor:[[MDCPalette cr_bluePalette] tint500]
36 forState:UIControlStateNormal];
37 [self setBackgroundColor:[UIColor colorWithWhite:0.6f alpha:1.0f]
38 forState:UIControlStateDisabled];
39 self.customTitleColor = [UIColor whiteColor];
40 }
41
42 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/fancy_ui/primary_action_button.h ('k') | ios/chrome/browser/ui/fancy_ui/tinted_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698