| 506 | } |
| 507 | |
| 508 | void WinNativeWidget::ResizeChild() |
| 509 | { |
| 510 | if (_childWindow != NULL){ |
| 511 | |
| 512 | int k = GetDevicePixelRatio(); |
| 513 | |
| 514 | if (_shadow != NULL){ |
| 515 | _shadow->setScale(k); |
| 516 | _shadow->moveShadow(); |
| 517 | } |
| 518 | |
| 519 | RECT rc; |
| 520 | GetClientRect(_hWnd, &rc); |
| 521 | |
| 522 | int x = 0; |
| 523 | int y = 0; |
| 524 | int w = rc.right - rc.left; |
| 525 | int h = rc.bottom - rc.top; |
| 526 | |
| 527 | if (IsMaxsized()){ |
| 528 | int borderSizeX = GetSystemMetrics(SM_CXSIZEFRAME) - 2; |
| 529 | int borderSizeY = GetSystemMetrics(SM_CYSIZEFRAME) - 2; |
| 530 | x += borderSizeX; |
| 531 | y += borderSizeY; |
| 532 | w -= borderSizeX * 2; |
| 533 | h -= borderSizeY * 2; |
| 534 | } |
| 535 | |
| 536 | MoveWindow(_childWindow, x, y, w + 1 , h + 1 , 1); |
| 537 | MoveWindow(_childWindow, x, y, w , h , 1); |
| 538 | _childWidget->updateGeometry(); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | bool WinNativeWidget::isActiveWindow() |
| 543 | { |
no test coverage detected