Commit 5e289147 authored by Allen Bauer's avatar Allen Bauer Committed by Commit Bot

Moved OnThemeChanged notification after OnAddedToWidget

Bug: 1041614
Change-Id: Ie2bd59392a07d83d693603ccc4d540bc99680193
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028737
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736937}
parent 2da81172
...@@ -2196,12 +2196,6 @@ void View::AddChildViewAtImpl(View* view, int index) { ...@@ -2196,12 +2196,6 @@ void View::AddChildViewAtImpl(View* view, int index) {
// inherit the visibility of the owner View. // inherit the visibility of the owner View.
view->UpdateLayerVisibility(); view->UpdateLayerVisibility();
if (widget) {
const ui::NativeTheme* new_theme = view->GetNativeTheme();
if (new_theme != old_theme)
view->PropagateThemeChanged();
}
// Need to notify the layout manager because one of the callbacks below might // Need to notify the layout manager because one of the callbacks below might
// want to know the view's new preferred size, minimum size, etc. // want to know the view's new preferred size, minimum size, etc.
if (layout_manager_) if (layout_manager_)
...@@ -2214,6 +2208,12 @@ void View::AddChildViewAtImpl(View* view, int index) { ...@@ -2214,6 +2208,12 @@ void View::AddChildViewAtImpl(View* view, int index) {
view->PropagateAddNotifications(details, widget && widget != old_widget); view->PropagateAddNotifications(details, widget && widget != old_widget);
if (widget) {
const ui::NativeTheme* new_theme = view->GetNativeTheme();
if (new_theme != old_theme)
view->PropagateThemeChanged();
}
UpdateTooltip(); UpdateTooltip();
if (widget) { if (widget) {
......
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