OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/material_components/utils.h" | 5 #import "ios/chrome/browser/ui/material_components/utils.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #import "ios/third_party/material_components_ios/src/components/AppBar/src/Mater
ialAppBar.h" | 9 #import "ios/third_party/material_components_ios/src/components/AppBar/src/Mater
ialAppBar.h" |
10 #import "ios/third_party/material_components_ios/src/components/FlexibleHeader/s
rc/MaterialFlexibleHeader.h" | 10 #import "ios/third_party/material_components_ios/src/components/FlexibleHeader/s
rc/MaterialFlexibleHeader.h" |
11 #import "ios/third_party/material_components_ios/src/components/NavigationBar/sr
c/MaterialNavigationBar.h" | 11 #import "ios/third_party/material_components_ios/src/components/NavigationBar/sr
c/MaterialNavigationBar.h" |
12 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat
erialPalettes.h" | 12 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat
erialPalettes.h" |
13 | 13 |
| 14 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 15 #error "This file requires ARC support." |
| 16 #endif |
| 17 |
14 void ConfigureAppBarWithCardStyle(MDCAppBar* appBar) { | 18 void ConfigureAppBarWithCardStyle(MDCAppBar* appBar) { |
15 appBar.headerViewController.headerView.canOverExtend = NO; | 19 appBar.headerViewController.headerView.canOverExtend = NO; |
16 appBar.headerViewController.headerView.shiftBehavior = | 20 appBar.headerViewController.headerView.shiftBehavior = |
17 MDCFlexibleHeaderShiftBehaviorDisabled; | 21 MDCFlexibleHeaderShiftBehaviorDisabled; |
18 appBar.headerViewController.headerView.backgroundColor = | 22 appBar.headerViewController.headerView.backgroundColor = |
19 [[MDCPalette greyPalette] tint200]; | 23 [[MDCPalette greyPalette] tint200]; |
20 appBar.navigationBar.tintColor = [[MDCPalette greyPalette] tint900]; | 24 appBar.navigationBar.tintColor = [[MDCPalette greyPalette] tint900]; |
21 appBar.navigationBar.titleAlignment = MDCNavigationBarTitleAlignmentLeading; | 25 appBar.navigationBar.titleAlignment = MDCNavigationBarTitleAlignmentLeading; |
22 } | 26 } |
OLD | NEW |