mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 06:19:35 +00:00
修复windows播放器元素溢出
This commit is contained in:
parent
0b71777b41
commit
699b7de311
5 changed files with 55 additions and 57 deletions
|
|
@ -25,8 +25,15 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
||||
|
||||
FlutterWindow window(project);
|
||||
Win32Window::Point origin(10, 10);
|
||||
Win32Window::Size size(1280, 720);
|
||||
// 居中
|
||||
UINT windowWidth = 832, windowHeight = 640;
|
||||
UINT scrWidth, scrHeight, xShaft, yShaft;
|
||||
scrWidth = GetSystemMetrics(SM_CXFULLSCREEN);
|
||||
scrHeight = GetSystemMetrics(SM_CYFULLSCREEN);
|
||||
xShaft = (scrWidth - windowWidth) / 2;
|
||||
yShaft = (scrHeight - windowHeight) / 2;
|
||||
Win32Window::Point origin(xShaft, yShaft);
|
||||
Win32Window::Size size(windowWidth, windowHeight);
|
||||
if (!window.Create(L"vaani", origin, size)) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue