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..da12b89e342e9cd68380010e7ccdfc5118b9cecf 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,10 @@ const char* LabelButton::GetClassName() const { |
void LabelButton::OnPaint(gfx::Canvas* canvas) { |
View::OnPaint(canvas); |
+ |
+ if (gfx::IsInvertedColorScheme()) |
sky
2014/01/06 20:20:37
This ends up being after the border is painted. Do
Greg Billock
2014/01/06 21:13:44
I placed this here to try and mimic the sequencing
msw
2014/01/06 21:50:57
Do label_->set_background(CreateSolidBackground(SK
Greg Billock
2014/01/06 22:14:46
That's true, we're kind of already pushing the lab
msw
2014/01/06 22:34:55
Neither Label nor LabelButton seem to set any back
Greg Billock
2014/01/06 23:51:02
ok. This seems to work fine.*
* There are still a
msw
2014/01/07 00:00:54
Yeah, I think these are long-standing issues; many
|
+ canvas->FillRect(label_->bounds(), label_->background_color()); |
+ |
Painter::PaintFocusPainter(this, canvas, focus_painter_.get()); |
} |
@@ -297,7 +302,7 @@ void LabelButton::GetExtraParams(ui::NativeTheme::ExtraParams* params) const { |
params->button.is_focused = HasFocus() && IsAccessibilityFocusable(); |
params->button.has_border = style() == STYLE_NATIVE_TEXTBUTTON; |
params->button.classic_state = 0; |
- params->button.background_color = label()->background_color(); |
+ params->button.background_color = label_->background_color(); |
} |
void LabelButton::ResetColorsFromNativeTheme() { |