Chromium Code Reviews| 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 512 midy - grippy_half_width, | 512 midy - grippy_half_width, |
| 513 midy + grippy_half_width, | 513 midy + grippy_half_width, |
| 514 paint); | 514 paint); |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 } | 517 } |
| 518 | 518 |
| 519 void NativeThemeBase::PaintScrollbarCorner(SkCanvas* canvas, | 519 void NativeThemeBase::PaintScrollbarCorner(SkCanvas* canvas, |
| 520 State state, | 520 State state, |
| 521 const gfx::Rect& rect) const { | 521 const gfx::Rect& rect) const { |
| 522 SkPaint paint; | |
| 523 paint.setColor(SK_ColorWHITE); | |
| 524 paint.setStyle(SkPaint::kFill_Style); | |
| 525 paint.setXfermodeMode(SkXfermode::kSrc_Mode); | |
| 526 canvas->drawIRect(RectToSkIRect(rect), paint); | |
|
Andre
2014/08/12 23:55:04
Now that this is called, changed it to paint nothi
| |
| 527 } | 522 } |
| 528 | 523 |
| 529 void NativeThemeBase::PaintCheckbox(SkCanvas* canvas, | 524 void NativeThemeBase::PaintCheckbox(SkCanvas* canvas, |
| 530 State state, | 525 State state, |
| 531 const gfx::Rect& rect, | 526 const gfx::Rect& rect, |
| 532 const ButtonExtraParams& button) const { | 527 const ButtonExtraParams& button) const { |
| 533 SkRect skrect = PaintCheckboxRadioCommon(canvas, state, rect, | 528 SkRect skrect = PaintCheckboxRadioCommon(canvas, state, rect, |
| 534 SkIntToScalar(2)); | 529 SkIntToScalar(2)); |
| 535 if (!skrect.isEmpty()) { | 530 if (!skrect.isEmpty()) { |
| 536 // Draw the checkmark / dash. | 531 // Draw the checkmark / dash. |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1085 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f); | 1080 SkScalar min_diff = Clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f); |
| 1086 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); | 1081 SkScalar diff = Clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f); |
| 1087 | 1082 |
| 1088 if (hsv1[2] + hsv2[2] > 1.0) | 1083 if (hsv1[2] + hsv2[2] > 1.0) |
| 1089 diff = -diff; | 1084 diff = -diff; |
| 1090 | 1085 |
| 1091 return SaturateAndBrighten(hsv2, -0.2f, diff); | 1086 return SaturateAndBrighten(hsv2, -0.2f, diff); |
| 1092 } | 1087 } |
| 1093 | 1088 |
| 1094 } // namespace ui | 1089 } // namespace ui |
| OLD | NEW |