mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
Merge branch 'dev' of https://github.com/barry-ran/QtScrcpy into dev
This commit is contained in:
commit
173fe3968f
8 changed files with 68 additions and 71 deletions
|
@ -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;
|
||||
}
|
||||
)");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>513</width>
|
||||
<height>637</height>
|
||||
<width>600</width>
|
||||
<height>700</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>16777215</height>
|
||||
<height>2160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -187,7 +187,7 @@
|
|||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>200</height>
|
||||
<height>240</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
|
@ -307,7 +307,7 @@
|
|||
<item row="3" column="10" colspan="2">
|
||||
<widget class="QCheckBox" name="gameCheck">
|
||||
<property name="text">
|
||||
<string>custom map</string>
|
||||
<string>auto enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -394,7 +394,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="7" colspan="2">
|
||||
<widget class="QComboBox" name="videoSizeBox">
|
||||
<widget class="QComboBox" name="maxSizeBox">
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
|
@ -403,7 +403,7 @@
|
|||
<item row="0" column="4" colspan="3">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>video size:</string>
|
||||
<string>max size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Binary file not shown.
|
@ -75,7 +75,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="362"/>
|
||||
<location filename="../../dialog.cpp" line="280"/>
|
||||
<location filename="../../dialog.cpp" line="287"/>
|
||||
<source>select path</source>
|
||||
<translation>select path</translation>
|
||||
</message>
|
||||
|
@ -84,10 +84,6 @@
|
|||
<source>record format:</source>
|
||||
<translation>record format:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PUBG mobile</source>
|
||||
<translation type="vanished">PUBG mobile</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="72"/>
|
||||
<source>stop all server</source>
|
||||
|
@ -113,30 +109,35 @@
|
|||
<source>clear</source>
|
||||
<translation>clear</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="300"/>
|
||||
<source>reverse connection</source>
|
||||
<translation>reverse connection</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="310"/>
|
||||
<source>auto enable</source>
|
||||
<translation>auto enable</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="339"/>
|
||||
<source>background record</source>
|
||||
<translation>background record</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="355"/>
|
||||
<source>screen-off</source>
|
||||
<translation>screen-off</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="392"/>
|
||||
<source>apply</source>
|
||||
<translation>apply</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="300"/>
|
||||
<source>reverse connection</source>
|
||||
<translation>reverse connection</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="42"/>
|
||||
<source>get device IP</source>
|
||||
<translation>get device IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="355"/>
|
||||
<source>screen-off</source>
|
||||
<translation>turn screen off</translation>
|
||||
<location filename="../../dialog.ui" line="406"/>
|
||||
<source>max size:</source>
|
||||
<translation>max size:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="323"/>
|
||||
|
@ -149,9 +150,9 @@
|
|||
<translation>refresh script</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="310"/>
|
||||
<source>custom map</source>
|
||||
<translation>custom map</translation>
|
||||
<location filename="../../dialog.ui" line="42"/>
|
||||
<source>get device IP</source>
|
||||
<translation>get device IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="26"/>
|
||||
|
@ -182,11 +183,6 @@
|
|||
<source>bit rate:</source>
|
||||
<translation>bit rate:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="406"/>
|
||||
<source>video size:</source>
|
||||
<translation>video size:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="89"/>
|
||||
<source>start adbd</source>
|
||||
|
@ -284,7 +280,7 @@
|
|||
<translation type="vanished">file transfer failed</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../device/ui/videoform.cpp" line="407"/>
|
||||
<location filename="../../device/ui/videoform.cpp" line="408"/>
|
||||
<source>file does not exist</source>
|
||||
<translation>file does not exist</translation>
|
||||
</message>
|
||||
|
|
Binary file not shown.
|
@ -75,7 +75,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="362"/>
|
||||
<location filename="../../dialog.cpp" line="280"/>
|
||||
<location filename="../../dialog.cpp" line="287"/>
|
||||
<source>select path</source>
|
||||
<translation>选择路径</translation>
|
||||
</message>
|
||||
|
@ -84,10 +84,6 @@
|
|||
<source>record format:</source>
|
||||
<translation>录制格式:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>PUBG mobile</source>
|
||||
<translation type="vanished">和平精英</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="72"/>
|
||||
<source>stop all server</source>
|
||||
|
@ -113,30 +109,35 @@
|
|||
<source>clear</source>
|
||||
<translation>清理</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="300"/>
|
||||
<source>reverse connection</source>
|
||||
<translation>反向连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="310"/>
|
||||
<source>auto enable</source>
|
||||
<translation>自动启用脚本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="339"/>
|
||||
<source>background record</source>
|
||||
<translation>后台录制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="355"/>
|
||||
<source>screen-off</source>
|
||||
<translation>自动息屏</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="392"/>
|
||||
<source>apply</source>
|
||||
<translation>应用脚本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="300"/>
|
||||
<source>reverse connection</source>
|
||||
<translation>反向连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="42"/>
|
||||
<source>get device IP</source>
|
||||
<translation>获取设备IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="355"/>
|
||||
<source>screen-off</source>
|
||||
<translation>自动息屏</translation>
|
||||
<location filename="../../dialog.ui" line="406"/>
|
||||
<source>max size:</source>
|
||||
<translation>最大尺寸:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="323"/>
|
||||
|
@ -149,9 +150,9 @@
|
|||
<translation>刷新脚本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="310"/>
|
||||
<source>custom map</source>
|
||||
<translation>自定义映射</translation>
|
||||
<location filename="../../dialog.ui" line="42"/>
|
||||
<source>get device IP</source>
|
||||
<translation>获取设备IP</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="26"/>
|
||||
|
@ -182,11 +183,6 @@
|
|||
<source>bit rate:</source>
|
||||
<translation>比特率:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="406"/>
|
||||
<source>video size:</source>
|
||||
<translation>视频尺寸:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../dialog.ui" line="89"/>
|
||||
<source>start adbd</source>
|
||||
|
@ -284,7 +280,7 @@
|
|||
<translation type="vanished">文件传输失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../device/ui/videoform.cpp" line="407"/>
|
||||
<location filename="../../device/ui/videoform.cpp" line="408"/>
|
||||
<source>file does not exist</source>
|
||||
<translation>文件不存在</translation>
|
||||
</message>
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue