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

Unified 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 4 years 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/fancy_ui/primary_action_button.mm
diff --git a/ios/chrome/browser/ui/fancy_ui/primary_action_button.mm b/ios/chrome/browser/ui/fancy_ui/primary_action_button.mm
new file mode 100644
index 0000000000000000000000000000000000000000..b8827323daa8e157d634ed798cd1805030cafc8f
--- /dev/null
+++ b/ios/chrome/browser/ui/fancy_ui/primary_action_button.mm
@@ -0,0 +1,42 @@
+// Copyright 2012 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 "ios/chrome/browser/ui/fancy_ui/primary_action_button.h"
+
+#import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
+
+@implementation PrimaryActionButton
+
+- (id)initWithFrame:(CGRect)frame {
+ self = [super initWithFrame:frame];
+ if (self)
+ [self initializeStyling];
+ return self;
+}
+
+- (id)initWithCoder:(NSCoder*)aDecoder {
+ self = [super initWithCoder:aDecoder];
+ if (self)
+ [self initializeStyling];
+ return self;
+}
+
+- (void)awakeFromNib {
+ [super awakeFromNib];
+ [self initializeStyling];
+}
+
+- (void)initializeStyling {
+ self.hasOpaqueBackground = YES;
+ self.underlyingColorHint = [UIColor whiteColor];
+ self.inkColor =
+ [[[MDCPalette cr_bluePalette] tint300] colorWithAlphaComponent:0.5f];
+ [self setBackgroundColor:[[MDCPalette cr_bluePalette] tint500]
+ forState:UIControlStateNormal];
+ [self setBackgroundColor:[UIColor colorWithWhite:0.6f alpha:1.0f]
+ forState:UIControlStateDisabled];
+ self.customTitleColor = [UIColor whiteColor];
+}
+
+@end
« 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