fix:保持视频窗口和实际视频分辨率比例一致

This commit is contained in:
rankun 2019-07-12 10:32:38 +08:00
parent 69f435fdec
commit 93d84b44a2

View file

@ -137,6 +137,12 @@ void VideoForm::updateShowSize(const QSize &newSize)
if (isFullScreen()) {
switchFullScreen();
}
if (layout()) {
QMargins m = layout()->contentsMargins();
showSize.setWidth(showSize.width() + m.left() + m.right());
showSize.setHeight(showSize.height() + m.top() + m.bottom());
}
// 窗口居中
move(screenRect.center() - QRect(0, 0, showSize.width(), showSize.height()).center());
}