| 590 | } |
| 591 | |
| 592 | void MainFrame::saveNormalRegion() |
| 593 | { |
| 594 | if (!_is_resize_ready){ |
| 595 | return; |
| 596 | } |
| 597 | if (!IsNormalsized()){ |
| 598 | return; |
| 599 | } |
| 600 | |
| 601 | AppConfig &app = AppConfig::Instance(); |
| 602 | |
| 603 | #ifdef _WIN32 |
| 604 | if (_parentNativeWidget != NULL){ |
| 605 | RECT rc; |
| 606 | int k = _parentNativeWidget->GetDevicePixelRatio(); |
| 607 | |
| 608 | GetWindowRect(_parentNativeWidget->Handle(), &rc); |
| 609 | app.frameOptions.left = rc.left / k; |
| 610 | app.frameOptions.top = rc.top / k; |
| 611 | app.frameOptions.right = rc.right / k; |
| 612 | app.frameOptions.bottom = rc.bottom / k; |
| 613 | app.frameOptions.x = rc.left / k; |
| 614 | app.frameOptions.y = rc.top / k; |
| 615 | } |
| 616 | #endif |
| 617 | |
| 618 | if (_parentNativeWidget == NULL){ |
| 619 | QRect rc = geometry(); |
| 620 | app.frameOptions.left = rc.left(); |
| 621 | app.frameOptions.top = rc.top(); |
| 622 | app.frameOptions.right = rc.right(); |
| 623 | app.frameOptions.bottom = rc.bottom(); |
| 624 | app.frameOptions.x = rc.left(); |
| 625 | app.frameOptions.y = rc.top(); |
| 626 | } |
| 627 | } |
| 628 | |
| 629 | void MainFrame::writeSettings() |
| 630 | { |
nothing calls this directly
no test coverage detected