MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / saveNormalRegion

Method saveNormalRegion

DSView/pv/mainframe.cpp:592–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592void 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
629void MainFrame::writeSettings()
630{

Callers

nothing calls this directly

Calls 2

GetDevicePixelRatioMethod · 0.80
HandleMethod · 0.80

Tested by

no test coverage detected