Commit 94d94bec authored by My Nguyen's avatar My Nguyen Committed by Commit Bot

Use 6% Black as background color for suggestion view

Mock: http://go/e14s-emoji-suggestion-mock

Bug: 1099454
Change-Id: I7c048372185eddf0df4719288b61413378db2b25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2268757Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: My Nguyen <myy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782736}
parent cb9610f4
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/input_method/ui/suggestion_details.h" #include "chrome/browser/chromeos/input_method/ui/suggestion_details.h"
#include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_enums.mojom.h"
#include "ui/gfx/color_utils.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/background.h" #include "ui/views/background.h"
#include "ui/views/border.h" #include "ui/views/border.h"
#include "ui/views/controls/label.h" #include "ui/views/controls/label.h"
...@@ -130,15 +128,10 @@ void SuggestionView::SetHighlighted(bool highlighted) { ...@@ -130,15 +128,10 @@ void SuggestionView::SetHighlighted(bool highlighted) {
highlighted_ = highlighted; highlighted_ = highlighted;
if (highlighted) { if (highlighted) {
NotifyAccessibilityEvent(ax::mojom::Event::kSelection, false); NotifyAccessibilityEvent(ax::mojom::Event::kSelection, false);
ui::NativeTheme* theme = GetNativeTheme(); // TODO(crbug/1099044): Use System Color for button highlight.
SetBackground(views::CreateSolidBackground(theme->GetSystemColor( SetBackground(views::CreateSolidBackground(kButtonHighlightColor));
ui::NativeTheme::kColorId_TextfieldSelectionBackgroundFocused)));
SetBorder(views::CreateSolidBorder(
1,
theme->GetSystemColor(ui::NativeTheme::kColorId_FocusedBorderColor)));
} else { } else {
SetBackground(nullptr); SetBackground(nullptr);
SetBorder(views::CreateEmptyBorder(1, 1, 1, 1));
} }
SchedulePaint(); SchedulePaint();
} }
......
...@@ -30,6 +30,8 @@ constexpr int kAnnotationPaddingHeight = 6; ...@@ -30,6 +30,8 @@ constexpr int kAnnotationPaddingHeight = 6;
constexpr char kTabKey[] = "tab"; constexpr char kTabKey[] = "tab";
constexpr SkColor kConfirmedTextColor = gfx::kGoogleGrey900; constexpr SkColor kConfirmedTextColor = gfx::kGoogleGrey900;
constexpr SkColor kSuggestionColor = gfx::kGoogleGrey700; constexpr SkColor kSuggestionColor = gfx::kGoogleGrey700;
constexpr SkColor kButtonHighlightColor =
SkColorSetA(SK_ColorBLACK, 0x0F); // 6% Black.
// SuggestionView renders a suggestion. // SuggestionView renders a suggestion.
class UI_CHROMEOS_EXPORT SuggestionView : public views::View { class UI_CHROMEOS_EXPORT SuggestionView : public views::View {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment