| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "ui/native_theme/native_theme_aura.h" | 5 #include "ui/native_theme/native_theme_aura.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
| 9 #include "ui/base/layout.h" | 9 #include "ui/base/layout.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 const SkColor kDisabledMenuItemForegroundColor = kTextButtonDisabledColor; | 36 const SkColor kDisabledMenuItemForegroundColor = kTextButtonDisabledColor; |
| 37 const SkColor kFocusedMenuItemBackgroundColor = SkColorSetRGB(0xF1, 0xF1, 0xF1); | 37 const SkColor kFocusedMenuItemBackgroundColor = SkColorSetRGB(0xF1, 0xF1, 0xF1); |
| 38 const SkColor kMenuSeparatorColor = SkColorSetRGB(0xED, 0xED, 0xED); | 38 const SkColor kMenuSeparatorColor = SkColorSetRGB(0xED, 0xED, 0xED); |
| 39 // Label: | 39 // Label: |
| 40 const SkColor kLabelEnabledColor = kTextButtonEnabledColor; | 40 const SkColor kLabelEnabledColor = kTextButtonEnabledColor; |
| 41 const SkColor kLabelDisabledColor = kTextButtonDisabledColor; | 41 const SkColor kLabelDisabledColor = kTextButtonDisabledColor; |
| 42 const SkColor kLabelBackgroundColor = SK_ColorWHITE; | 42 const SkColor kLabelBackgroundColor = SK_ColorWHITE; |
| 43 // Textfield: | 43 // Textfield: |
| 44 const SkColor kTextfieldDefaultColor = SK_ColorBLACK; | 44 const SkColor kTextfieldDefaultColor = SK_ColorBLACK; |
| 45 const SkColor kTextfieldDefaultBackground = SK_ColorWHITE; | 45 const SkColor kTextfieldDefaultBackground = SK_ColorWHITE; |
| 46 const SkColor kTextfieldReadOnlyColor = SK_ColorDKGRAY; |
| 47 const SkColor kTextfieldReadOnlyBackground = SK_ColorWHITE; |
| 46 const SkColor kTextfieldSelectionBackgroundFocused = | 48 const SkColor kTextfieldSelectionBackgroundFocused = |
| 47 SkColorSetARGB(0x54, 0x60, 0xA8, 0xEB); | 49 SkColorSetARGB(0x54, 0x60, 0xA8, 0xEB); |
| 48 const SkColor kTextfieldSelectionBackgroundUnfocused = SK_ColorLTGRAY; | 50 const SkColor kTextfieldSelectionBackgroundUnfocused = SK_ColorLTGRAY; |
| 49 const SkColor kTextfieldSelectionColor = | 51 const SkColor kTextfieldSelectionColor = |
| 50 color_utils::AlphaBlend(SK_ColorBLACK, | 52 color_utils::AlphaBlend(SK_ColorBLACK, |
| 51 kTextfieldSelectionBackgroundFocused, 0xdd); | 53 kTextfieldSelectionBackgroundFocused, 0xdd); |
| 52 | 54 |
| 53 } // namespace | 55 } // namespace |
| 54 | 56 |
| 55 namespace ui { | 57 namespace ui { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 case kColorId_LabelDisabledColor: | 122 case kColorId_LabelDisabledColor: |
| 121 return kLabelDisabledColor; | 123 return kLabelDisabledColor; |
| 122 case kColorId_LabelBackgroundColor: | 124 case kColorId_LabelBackgroundColor: |
| 123 return kLabelBackgroundColor; | 125 return kLabelBackgroundColor; |
| 124 | 126 |
| 125 // Textfield | 127 // Textfield |
| 126 case kColorId_TextfieldDefaultColor: | 128 case kColorId_TextfieldDefaultColor: |
| 127 return kTextfieldDefaultColor; | 129 return kTextfieldDefaultColor; |
| 128 case kColorId_TextfieldDefaultBackground: | 130 case kColorId_TextfieldDefaultBackground: |
| 129 return kTextfieldDefaultBackground; | 131 return kTextfieldDefaultBackground; |
| 132 case kColorId_TextfieldReadOnlyColor: |
| 133 return kTextfieldReadOnlyColor; |
| 134 case kColorId_TextfieldReadOnlyBackground: |
| 135 return kTextfieldReadOnlyBackground; |
| 130 case kColorId_TextfieldSelectionColor: | 136 case kColorId_TextfieldSelectionColor: |
| 131 return kTextfieldSelectionColor; | 137 return kTextfieldSelectionColor; |
| 132 case kColorId_TextfieldSelectionBackgroundFocused: | 138 case kColorId_TextfieldSelectionBackgroundFocused: |
| 133 return kTextfieldSelectionBackgroundFocused; | 139 return kTextfieldSelectionBackgroundFocused; |
| 134 case kColorId_TextfieldSelectionBackgroundUnfocused: | 140 case kColorId_TextfieldSelectionBackgroundUnfocused: |
| 135 return kTextfieldSelectionBackgroundUnfocused; | 141 return kTextfieldSelectionBackgroundUnfocused; |
| 136 | 142 |
| 137 default: | 143 default: |
| 138 NOTREACHED() << "Invalid color_id: " << color_id; | 144 NOTREACHED() << "Invalid color_id: " << color_id; |
| 139 break; | 145 break; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 DrawTiledImage(canvas, *center, | 299 DrawTiledImage(canvas, *center, |
| 294 0, 0, 1.0, 1.0, | 300 0, 0, 1.0, 1.0, |
| 295 rect.x() + left->width(), rect.y(), | 301 rect.x() + left->width(), rect.y(), |
| 296 rect.width() - left->width() - right->width(), | 302 rect.width() - left->width() - right->width(), |
| 297 center->height()); | 303 center->height()); |
| 298 } | 304 } |
| 299 } | 305 } |
| 300 } | 306 } |
| 301 | 307 |
| 302 } // namespace ui | 308 } // namespace ui |
| OLD | NEW |