Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: ui/chromeos/ime/candidate_window_view.cc

Issue 2584013003: Fix background opacity/color of IME candidate window. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/chromeos/ime/candidate_window_view.cc
diff --git a/ui/chromeos/ime/candidate_window_view.cc b/ui/chromeos/ime/candidate_window_view.cc
index 5c42421172df3216dd4353de09c871f24b229208..93755219f3f3da76ab4033c5dec94c2010594ffb 100644
--- a/ui/chromeos/ime/candidate_window_view.cc
+++ b/ui/chromeos/ime/candidate_window_view.cc
@@ -14,6 +14,7 @@
#include "ui/chromeos/ime/candidate_window_constants.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
+#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/background.h"
@@ -34,10 +35,11 @@ class CandidateWindowBorder : public views::BubbleBorder {
explicit CandidateWindowBorder(gfx::NativeView parent)
: views::BubbleBorder(views::BubbleBorder::TOP_CENTER,
views::BubbleBorder::NO_SHADOW,
- SK_ColorTRANSPARENT),
+ gfx::kPlaceholderColor),
parent_(parent),
offset_(0) {
set_paint_arrow(views::BubbleBorder::PAINT_NONE);
+ set_use_theme_background_color(true);
}
~CandidateWindowBorder() override {}
@@ -155,13 +157,10 @@ CandidateWindowView::CandidateWindowView(gfx::NativeView parent)
set_parent_window(parent);
set_margins(gfx::Insets());
- // Set the background and the border of the view.
- ui::NativeTheme* theme = GetNativeTheme();
- set_background(
- views::Background::CreateSolidBackground(theme->GetSystemColor(
- ui::NativeTheme::kColorId_WindowBackground)));
SetBorder(views::Border::CreateSolidBorder(
- 1, theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBorderColor)));
+ 1,
+ GetNativeTheme()->theme->GetSystemColor(
+ ui::NativeTheme::kColorId_MenuBorderColor)));
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
auxiliary_text_ = new InformationTextArea(gfx::ALIGN_RIGHT, 0);
@@ -201,6 +200,7 @@ views::Widget* CandidateWindowView::InitWidget() {
GetBubbleFrameView()->SetBubbleBorder(std::unique_ptr<views::BubbleBorder>(
new CandidateWindowBorder(parent_window())));
+ GetBubbleFrameView()->OnNativeThemeChanged(widget->GetNativeTheme());
return widget;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698