| 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_base.h" | 5 #include "ui/native_theme/native_theme_base.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 return; | 193 return; |
| 194 | 194 |
| 195 canvas->save(); | 195 canvas->save(); |
| 196 canvas->clipRect(gfx::RectToSkRect(rect)); | 196 canvas->clipRect(gfx::RectToSkRect(rect)); |
| 197 | 197 |
| 198 switch (part) { | 198 switch (part) { |
| 199 // Please keep these in the order of NativeTheme::Part. | 199 // Please keep these in the order of NativeTheme::Part. |
| 200 case kComboboxArrow: | 200 case kComboboxArrow: |
| 201 CommonThemePaintComboboxArrow(canvas, rect); | 201 CommonThemePaintComboboxArrow(canvas, rect); |
| 202 break; | 202 break; |
| 203 case kComboboxArrowBackground: |
| 204 PaintComboboxArrowBackground(canvas, state, rect); |
| 205 break; |
| 203 case kCheckbox: | 206 case kCheckbox: |
| 204 PaintCheckbox(canvas, state, rect, extra.button); | 207 PaintCheckbox(canvas, state, rect, extra.button); |
| 205 break; | 208 break; |
| 206 case kInnerSpinButton: | 209 case kInnerSpinButton: |
| 207 PaintInnerSpinButton(canvas, state, rect, extra.inner_spin); | 210 PaintInnerSpinButton(canvas, state, rect, extra.inner_spin); |
| 208 break; | 211 break; |
| 209 case kMenuList: | 212 case kMenuList: |
| 210 PaintMenuList(canvas, state, rect, extra.menu_list); | 213 PaintMenuList(canvas, state, rect, extra.menu_list); |
| 211 break; | 214 break; |
| 212 case kMenuPopupBackground: | 215 case kMenuPopupBackground: |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f); | 1036 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f); |
| 1034 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); | 1037 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); |
| 1035 | 1038 |
| 1036 if (hsv1[2] + hsv2[2] > 1.0) | 1039 if (hsv1[2] + hsv2[2] > 1.0) |
| 1037 diff = -diff; | 1040 diff = -diff; |
| 1038 | 1041 |
| 1039 return SaturateAndBrighten(hsv2, -0.2f, diff); | 1042 return SaturateAndBrighten(hsv2, -0.2f, diff); |
| 1040 } | 1043 } |
| 1041 | 1044 |
| 1042 } // namespace ui | 1045 } // namespace ui |
| OLD | NEW |