mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-22 10:19:33 +00:00
Merge pull request #666 from re2zero/dev
feat: enable back to original size after exit fullscreen.
This commit is contained in:
commit
ffaf41d994
2 changed files with 6 additions and 0 deletions
|
@ -467,6 +467,8 @@ void VideoForm::switchFullScreen()
|
|||
}
|
||||
|
||||
showNormal();
|
||||
// back to normal size.
|
||||
resize(m_normalSize);
|
||||
// fullscreen window will move (0,0). qt bug?
|
||||
move(m_fullScreenBeforePos);
|
||||
|
||||
|
@ -487,6 +489,9 @@ void VideoForm::switchFullScreen()
|
|||
ui->keepRatioWidget->setWidthHeightRatio(-1.0f);
|
||||
}
|
||||
|
||||
// record current size before fullscreen, it will be used to rollback size after exit fullscreen.
|
||||
m_normalSize = size();
|
||||
|
||||
m_fullScreenBeforePos = pos();
|
||||
// 这种临时增加标题栏再全屏的方案会导致收不到mousemove事件,导致setmousetrack失效
|
||||
// mac fullscreen must show title bar
|
||||
|
|
|
@ -79,6 +79,7 @@ private:
|
|||
|
||||
//inside member
|
||||
QSize m_frameSize;
|
||||
QSize m_normalSize;
|
||||
QPoint m_dragPosition;
|
||||
float m_widthHeightRatio = 0.5f;
|
||||
bool m_skin = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue