summaryrefslogtreecommitdiffstats
path: root/ui/views/window/dialog_client_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/views/window/dialog_client_view.cc')
-rw-r--r--ui/views/window/dialog_client_view.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/ui/views/window/dialog_client_view.cc b/ui/views/window/dialog_client_view.cc
index cdcc98ef..e100fd1 100644
--- a/ui/views/window/dialog_client_view.cc
+++ b/ui/views/window/dialog_client_view.cc
@@ -265,13 +265,6 @@ void DialogClientView::ViewHierarchyChanged(
const ViewHierarchyChangedDetails& details) {
ClientView::ViewHierarchyChanged(details);
if (details.is_add && details.child == this) {
- // The old dialog style needs an explicit background color, while the new
- // dialog style simply inherits the bubble's frame view color.
- const DialogDelegate* dialog = GetDialogDelegate();
- if (dialog && !dialog->UseNewStyleForThisDialog())
- set_background(views::Background::CreateSolidBackground(GetNativeTheme()->
- GetSystemColor(ui::NativeTheme::kColorId_DialogBackground)));
-
focus_manager_ = GetFocusManager();
if (focus_manager_)
GetFocusManager()->AddFocusChangeListener(this);
@@ -304,6 +297,17 @@ void DialogClientView::NativeViewHierarchyChanged() {
}
}
+void DialogClientView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
+ // The old dialog style needs an explicit background color, while the new
+ // dialog style simply inherits the bubble's frame view color.
+ const DialogDelegate* dialog = GetDialogDelegate();
+
+ if (dialog && !dialog->UseNewStyleForThisDialog()) {
+ set_background(views::Background::CreateSolidBackground(GetNativeTheme()->
+ GetSystemColor(ui::NativeTheme::kColorId_DialogBackground)));
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// DialogClientView, ButtonListener implementation: