Chromium Code Reviews| Index: ui/views/controls/button/label_button.cc |
| diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc |
| index 888a97c53fe1258e7a073d6f38ad2182d3fb7267..e858230c32cd2d824f47de5a420e2dbc8b315d8c 100644 |
| --- a/ui/views/controls/button/label_button.cc |
| +++ b/ui/views/controls/button/label_button.cc |
| @@ -8,6 +8,7 @@ |
| #include "grit/ui_resources.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/animation/throb_animation.h" |
| +#include "ui/gfx/canvas.h" |
| #include "ui/gfx/font_list.h" |
| #include "ui/gfx/sys_color_change_listener.h" |
| #include "ui/native_theme/native_theme.h" |
| @@ -275,6 +276,12 @@ const char* LabelButton::GetClassName() const { |
| void LabelButton::OnPaint(gfx::Canvas* canvas) { |
| View::OnPaint(canvas); |
| + |
| + if (gfx::IsInvertedColorScheme()) { |
| + gfx::Rect rect(label()->bounds()); |
| + canvas->FillRect(rect, label()->background_color()); |
|
msw
2014/01/03 00:16:39
nit: s/label()/label_/; inline label_->bounds(); d
Greg Billock
2014/01/06 17:29:20
Done.
|
| + } |
| + |
| Painter::PaintFocusPainter(this, canvas, focus_painter_.get()); |
| } |