diff --git a/QtScrcpy/dialog.cpp b/QtScrcpy/dialog.cpp index 71a4a07..a4fb50a 100644 --- a/QtScrcpy/dialog.cpp +++ b/QtScrcpy/dialog.cpp @@ -621,6 +621,10 @@ void Dialog::on_useSingleModeCheck_clicked() ui->wirelessGroupBox->show(); ui->usbGroupBox->show(); } + + QTimer::singleShot(0, this, [this](){ + resize(width(), layout()->sizeHint().height()); + }); } void Dialog::on_serialBox_currentIndexChanged(const QString &arg1) diff --git a/QtScrcpy/dialog.ui b/QtScrcpy/dialog.ui index b098da0..89103c5 100644 --- a/QtScrcpy/dialog.ui +++ b/QtScrcpy/dialog.ui @@ -7,7 +7,7 @@ 0 0 500 - 745 + 769 @@ -72,10 +72,22 @@ + + + 0 + 0 + + + + + 0 + 100 + + 16777215 - 16777215 + 100 @@ -751,10 +763,22 @@ + + + 0 + 0 + + 0 - 140 + 100 + + + + + 16777215 + 100 @@ -768,6 +792,19 @@ + + + + Qt::Vertical + + + + 20 + 0 + + + + diff --git a/QtScrcpy/main.cpp b/QtScrcpy/main.cpp index 50178f0..def7be0 100644 --- a/QtScrcpy/main.cpp +++ b/QtScrcpy/main.cpp @@ -56,6 +56,10 @@ int main(int argc, char *argv[]) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); +#endif + QSurfaceFormat varFormat = QSurfaceFormat::defaultFormat(); varFormat.setVersion(2, 0); varFormat.setProfile(QSurfaceFormat::NoProfile);