mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 14:18:45 +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()) {
|
||||
switchFullScreen();
|
||||
}
|
||||
if (layout()) {
|
||||
if (m_skin) {
|
||||
QMargins m = getMargins(vertical);
|
||||
showSize.setWidth(showSize.width() + m.left() + m.right());
|
||||
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());
|
||||
}
|
||||
|
||||
if (!m_skin) {
|
||||
// 减去标题栏高度 (mark:已经没有标题栏了)
|
||||
//int titleBarHeight = style()->pixelMetric(QStyle::PM_TitleBarHeight);
|
||||
//showSize.setHeight(showSize.height() - titleBarHeight);
|
||||
int titleBarHeight = style()->pixelMetric(QStyle::PM_TitleBarHeight);
|
||||
showSize.setHeight(showSize.height() - titleBarHeight);
|
||||
}
|
||||
|
||||
if (showSize != size()) {
|
||||
#ifdef Q_OS_OSX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue