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

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

Issue 2502023002: Fix background opacity/color of IME candidate window. (Closed)
Patch Set: theme changed Created 4 years, 1 month 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 a37f2f0105a296749022f2eaa4d86afa42db28ce..921198d7d298c58267b01a014798b2043d2565c9 100644
--- a/ui/chromeos/ime/candidate_window_view.cc
+++ b/ui/chromeos/ime/candidate_window_view.cc
@@ -15,6 +15,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"
@@ -35,10 +36,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 {}
@@ -153,13 +155,9 @@ 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::CreateSolidBorder(
- 1, theme->GetSystemColor(ui::NativeTheme::kColorId_MenuBorderColor)));
+ 1, GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_MenuBorderColor)));
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
auxiliary_text_ = new InformationTextArea(gfx::ALIGN_RIGHT, 0);
@@ -199,6 +197,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