diff --git a/QtScrcpy/device/ui/videoform.cpp b/QtScrcpy/device/ui/videoform.cpp index 59dc1e8..e07d4b9 100644 --- a/QtScrcpy/device/ui/videoform.cpp +++ b/QtScrcpy/device/ui/videoform.cpp @@ -101,15 +101,15 @@ void VideoForm::updateStyleSheet(bool vertical) if (vertical) { setStyleSheet(R"( #videoForm { - border-image: url(:/image/videoform/phone-v.png) 150px 142px 85px 142px; - border-width: 150px 142px 85px 142px; + border-image: url(:/image/videoform/phone-v.png) 150px 65px 85px 65px; + border-width: 150px 65px 85px 65px; } )"); } else { setStyleSheet(R"( #videoForm { - border-image: url(:/image/videoform/phone-h.png) 142px 85px 142px 150px; - border-width: 142px 85px 142px 150px; + border-image: url(:/image/videoform/phone-h.png) 65px 85px 65px 150px; + border-width: 65px 85px 65px 150px; } )"); } diff --git a/QtScrcpy/dialog.cpp b/QtScrcpy/dialog.cpp index bc35821..fd8500a 100644 --- a/QtScrcpy/dialog.cpp +++ b/QtScrcpy/dialog.cpp @@ -80,11 +80,13 @@ void Dialog::initUI() ui->bitRateBox->addItem("10000000"); ui->bitRateBox->setCurrentIndex(2); - ui->videoSizeBox->addItem("480"); - ui->videoSizeBox->addItem("720"); - ui->videoSizeBox->addItem("1080"); - ui->videoSizeBox->addItem("native"); - ui->videoSizeBox->setCurrentIndex(1); + ui->maxSizeBox->addItem("600"); + ui->maxSizeBox->addItem("720"); + ui->maxSizeBox->addItem("1000"); + ui->maxSizeBox->addItem("1280"); + ui->maxSizeBox->addItem("1920"); + ui->maxSizeBox->addItem("native"); + ui->maxSizeBox->setCurrentIndex(3); ui->formatBox->addItem("mp4"); ui->formatBox->addItem("mkv"); @@ -147,7 +149,7 @@ void Dialog::on_startServerBtn_clicked() quint32 bitRate = ui->bitRateBox->currentText().trimmed().toUInt(); // this is ok that "native" toUshort is 0 - quint16 videoSize = ui->videoSizeBox->currentText().trimmed().toUShort(); + quint16 videoSize = ui->maxSizeBox->currentText().trimmed().toUShort(); Device::DeviceParams params; params.serial = ui->serialBox->currentText().trimmed(); params.maxSize = videoSize; diff --git a/QtScrcpy/dialog.ui b/QtScrcpy/dialog.ui index 853214f..c4161aa 100644 --- a/QtScrcpy/dialog.ui +++ b/QtScrcpy/dialog.ui @@ -6,14 +6,14 @@ 0 0 - 513 - 637 + 600 + 700 600 - 16777215 + 2160 @@ -187,7 +187,7 @@ 0 - 200 + 240 @@ -307,7 +307,7 @@ - custom map + auto enable @@ -394,7 +394,7 @@ - + @@ -403,7 +403,7 @@ - video size: + max size: diff --git a/QtScrcpy/res/i18n/QtScrcpy_en.qm b/QtScrcpy/res/i18n/QtScrcpy_en.qm index 3f9e9d4..f8fd86b 100644 Binary files a/QtScrcpy/res/i18n/QtScrcpy_en.qm and b/QtScrcpy/res/i18n/QtScrcpy_en.qm differ diff --git a/QtScrcpy/res/i18n/QtScrcpy_en.ts b/QtScrcpy/res/i18n/QtScrcpy_en.ts index c7274ba..a5e14e4 100644 --- a/QtScrcpy/res/i18n/QtScrcpy_en.ts +++ b/QtScrcpy/res/i18n/QtScrcpy_en.ts @@ -75,7 +75,7 @@ - + select path select path @@ -84,10 +84,6 @@ record format: record format: - - PUBG mobile - PUBG mobile - stop all server @@ -113,30 +109,35 @@ clear clear + + + reverse connection + reverse connection + + + + auto enable + auto enable + background record background record + + + screen-off + screen-off + apply apply - - reverse connection - reverse connection - - - - get device IP - get device IP - - - - screen-off - turn screen off + + max size: + max size: @@ -149,9 +150,9 @@ refresh script - - custom map - custom map + + get device IP + get device IP @@ -182,11 +183,6 @@ bit rate: bit rate: - - - video size: - video size: - start adbd @@ -284,7 +280,7 @@ file transfer failed - + file does not exist file does not exist diff --git a/QtScrcpy/res/i18n/QtScrcpy_zh.qm b/QtScrcpy/res/i18n/QtScrcpy_zh.qm index ce858b1..819342a 100644 Binary files a/QtScrcpy/res/i18n/QtScrcpy_zh.qm and b/QtScrcpy/res/i18n/QtScrcpy_zh.qm differ diff --git a/QtScrcpy/res/i18n/QtScrcpy_zh.ts b/QtScrcpy/res/i18n/QtScrcpy_zh.ts index c715cd3..3fbf5f1 100644 --- a/QtScrcpy/res/i18n/QtScrcpy_zh.ts +++ b/QtScrcpy/res/i18n/QtScrcpy_zh.ts @@ -75,7 +75,7 @@ - + select path 选择路径 @@ -84,10 +84,6 @@ record format: 录制格式: - - PUBG mobile - 和平精英 - stop all server @@ -113,30 +109,35 @@ clear 清理 + + + reverse connection + 反向连接 + + + + auto enable + 自动启用脚本 + background record 后台录制 + + + screen-off + 自动息屏 + apply 应用脚本 - - reverse connection - 反向连接 - - - - get device IP - 获取设备IP - - - - screen-off - 自动息屏 + + max size: + 最大尺寸: @@ -149,9 +150,9 @@ 刷新脚本 - - custom map - 自定义映射 + + get device IP + 获取设备IP @@ -182,11 +183,6 @@ bit rate: 比特率: - - - video size: - 视频尺寸: - start adbd @@ -284,7 +280,7 @@ 文件传输失败 - + file does not exist 文件不存在 diff --git a/QtScrcpy/util/mousetap/winmousetap.cpp b/QtScrcpy/util/mousetap/winmousetap.cpp index 0a4af53..7303998 100644 --- a/QtScrcpy/util/mousetap/winmousetap.cpp +++ b/QtScrcpy/util/mousetap/winmousetap.cpp @@ -32,6 +32,9 @@ void WinMouseTap::enableMouseEventTap(QWidget *widget, bool enabled) if(enabled) { QRect rc(widget->parentWidget()->mapToGlobal(widget->pos()) , widget->size()); + // high dpi support + rc.setTopLeft(rc.topLeft() * widget->devicePixelRatio()); + rc.setBottomRight(rc.bottomRight() * widget->devicePixelRatio()); RECT mainRect; mainRect.left = (LONG)rc.left(); mainRect.right = (LONG)rc.right();