mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 22:28:39 +00:00
fix: videoWidget width/height rate
This commit is contained in:
parent
0ebe3d3198
commit
0bafca754c
1 changed files with 11 additions and 9 deletions
|
@ -155,7 +155,7 @@ void VideoForm::updateShowSize(const QSize &newSize)
|
||||||
if (isFullScreen()) {
|
if (isFullScreen()) {
|
||||||
switchFullScreen();
|
switchFullScreen();
|
||||||
}
|
}
|
||||||
if (layout()) {
|
if (m_skin) {
|
||||||
QMargins m = getMargins(vertical);
|
QMargins m = getMargins(vertical);
|
||||||
showSize.setWidth(showSize.width() + m.left() + m.right());
|
showSize.setWidth(showSize.width() + m.left() + m.right());
|
||||||
showSize.setHeight(showSize.height() + m.top() + m.bottom());
|
showSize.setHeight(showSize.height() + m.top() + m.bottom());
|
||||||
|
@ -165,9 +165,11 @@ void VideoForm::updateShowSize(const QSize &newSize)
|
||||||
move(screenRect.center() - QRect(0, 0, showSize.width(), showSize.height()).center());
|
move(screenRect.center() - QRect(0, 0, showSize.width(), showSize.height()).center());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_skin) {
|
||||||
// 减去标题栏高度 (mark:已经没有标题栏了)
|
// 减去标题栏高度 (mark:已经没有标题栏了)
|
||||||
//int titleBarHeight = style()->pixelMetric(QStyle::PM_TitleBarHeight);
|
int titleBarHeight = style()->pixelMetric(QStyle::PM_TitleBarHeight);
|
||||||
//showSize.setHeight(showSize.height() - titleBarHeight);
|
showSize.setHeight(showSize.height() - titleBarHeight);
|
||||||
|
}
|
||||||
|
|
||||||
if (showSize != size()) {
|
if (showSize != size()) {
|
||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue