From 93d84b44a2f7baa4abb0ecc00221986428f46533 Mon Sep 17 00:00:00 2001 From: rankun Date: Fri, 12 Jul 2019 10:32:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=9D=E6=8C=81=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E5=92=8C=E5=AE=9E=E9=99=85=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=88=86=E8=BE=A8=E7=8E=87=E6=AF=94=E4=BE=8B=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QtScrcpy/device/ui/videoform.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/QtScrcpy/device/ui/videoform.cpp b/QtScrcpy/device/ui/videoform.cpp index 4eb75bf..a4ab032 100644 --- a/QtScrcpy/device/ui/videoform.cpp +++ b/QtScrcpy/device/ui/videoform.cpp @@ -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()); }