| Index: ui/views/controls/label.cc
|
| diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
|
| index 3533ea6f267d18a52a57a5c26999d270c3fd088b..aabc36047272b0079238f32b1cae583e94a057ec 100644
|
| --- a/ui/views/controls/label.cc
|
| +++ b/ui/views/controls/label.cc
|
| @@ -621,6 +621,25 @@ void Label::UpdateSelectionClipboard() {
|
| #endif
|
| }
|
|
|
| +SkColor Label::GetSelectionTextColor() const {
|
| + return actual_selection_text_color_;
|
| +}
|
| +
|
| +SkColor Label::GetSelectionBackgroundColor() const {
|
| + return selection_background_color_;
|
| +}
|
| +
|
| +SkColor Label::GetSelectionBackgroundUnfocusedColor() const {
|
| + // TODO(patricialor): Put a proper colour here.
|
| + return SK_ColorBLUE;
|
| +}
|
| +
|
| +void Label::OnWillChangeFocus(View* focused_before, View* focused_now) {
|
| + // TODO(patricialor): Test labels!
|
| + UpdateTextSelectionDrawState(this, focused_before, focused_now);
|
| + SchedulePaint();
|
| +}
|
| +
|
| const gfx::RenderText* Label::GetRenderTextForSelectionController() const {
|
| if (!selectable())
|
| return nullptr;
|
| @@ -824,8 +843,7 @@ void Label::ApplyTextColors() const {
|
| for (size_t i = 0; i < lines_.size(); ++i) {
|
| lines_[i]->SetColor(color);
|
| lines_[i]->set_selection_color(actual_selection_text_color_);
|
| - lines_[i]->set_selection_background_focused_color(
|
| - selection_background_color_);
|
| + lines_[i]->set_selection_background_color(selection_background_color_);
|
| lines_[i]->set_subpixel_rendering_suppressed(subpixel_rendering_suppressed);
|
| }
|
| }
|
|
|