mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
Update Windows system font change handling (#66021)
The engine now has an explicit API for system font changes, rather than expecting the WM_FONTCHANGE message to be forwarded to the Flutter view.
This commit is contained in:
parent
eaf3f8b4f7
commit
8162bbd8e8
|
@ -53,5 +53,12 @@ FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (message) {
|
||||||
|
case WM_FONTCHANGE:
|
||||||
|
flutter_controller_->engine()->ReloadSystemFonts();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
|
return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,11 +187,6 @@ Win32Window::MessageHandler(HWND hwnd,
|
||||||
SetFocus(child_content_);
|
SetFocus(child_content_);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Messages that are directly forwarded to embedding.
|
|
||||||
case WM_FONTCHANGE:
|
|
||||||
SendMessage(child_content_, WM_FONTCHANGE, NULL, NULL);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefWindowProc(window_handle_, message, wparam, lparam);
|
return DefWindowProc(window_handle_, message, wparam, lparam);
|
||||||
|
|
Loading…
Reference in a new issue