OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ios/chrome/browser/ui/toolbar/toolbar_button_tints.h" |
| 6 |
| 7 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 8 |
| 9 namespace toolbar { |
| 10 |
| 11 // The colors used to tint the buttons in the toolbar. |
| 12 const int kLightModeNormalColor = 0x5A5A5A; |
| 13 const int kIncognitoModeNormalColor = 0xFFFFFF; |
| 14 const int kDarkModeNormalColor = 0xFFFFFF; |
| 15 const int kPressedColor = 0x4285F4; |
| 16 |
| 17 UIColor* NormalButtonTint(ToolbarControllerStyle style) { |
| 18 switch (style) { |
| 19 case ToolbarControllerStyleLightMode: |
| 20 return UIColorFromRGB(kLightModeNormalColor); |
| 21 case ToolbarControllerStyleIncognitoMode: |
| 22 return UIColorFromRGB(kIncognitoModeNormalColor); |
| 23 case ToolbarControllerStyleDarkMode: |
| 24 return UIColorFromRGB(kDarkModeNormalColor); |
| 25 case ToolbarControllerStyleMaxStyles: |
| 26 NOTREACHED(); |
| 27 return nil; |
| 28 } |
| 29 } |
| 30 |
| 31 UIColor* HighlighButtonTint(ToolbarControllerStyle style) { |
| 32 return UIColorFromRGB(kPressedColor); |
| 33 DCHECK_NE(ToolbarControllerStyleMaxStyles, style); |
| 34 } |
| 35 |
| 36 } // namespace toolbar |
OLD | NEW |