mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-13 10:58:49 +00:00
update:
调整关闭屏幕和电源按钮的功能实现 安卓targetsdk更新到29
This commit is contained in:
parent
d973abfb9d
commit
246a346588
10 changed files with 38 additions and 25 deletions
BIN
QtScrcpy/res/font/fontawesome-webfont.pdf
Normal file
BIN
QtScrcpy/res/font/fontawesome-webfont.pdf
Normal file
Binary file not shown.
|
@ -113,14 +113,22 @@
|
||||||
<translation>expand notify</translation>
|
<translation>expand notify</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../toolform.ui" line="59"/>
|
|
||||||
<source>turn off</source>
|
<source>turn off</source>
|
||||||
<translation>turn off</translation>
|
<translation type="vanished">turn off</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>turn on</source>
|
||||||
|
<translation type="vanished">turn on</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../toolform.ui" line="59"/>
|
||||||
|
<source>close screen</source>
|
||||||
|
<translation>close screen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../toolform.ui" line="69"/>
|
<location filename="../../toolform.ui" line="69"/>
|
||||||
<source>turn on</source>
|
<source>power</source>
|
||||||
<translation>turn on</translation>
|
<translation>power</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../toolform.ui" line="79"/>
|
<location filename="../../toolform.ui" line="79"/>
|
||||||
|
|
|
@ -113,14 +113,22 @@
|
||||||
<translation>下拉通知</translation>
|
<translation>下拉通知</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../toolform.ui" line="59"/>
|
|
||||||
<source>turn off</source>
|
<source>turn off</source>
|
||||||
<translation>锁屏</translation>
|
<translation type="vanished">锁屏</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>turn on</source>
|
||||||
|
<translation type="vanished">解锁</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../toolform.ui" line="59"/>
|
||||||
|
<source>close screen</source>
|
||||||
|
<translation>关闭屏幕</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../toolform.ui" line="69"/>
|
<location filename="../../toolform.ui" line="69"/>
|
||||||
<source>turn on</source>
|
<source>power</source>
|
||||||
<translation>解锁</translation>
|
<translation>电源</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../toolform.ui" line="79"/>
|
<location filename="../../toolform.ui" line="79"/>
|
||||||
|
|
|
@ -34,10 +34,10 @@ void ToolForm::initStyle()
|
||||||
//IconHelper::Instance()->SetIcon(ui->returnBtn, QChar(0xf104), 15);
|
//IconHelper::Instance()->SetIcon(ui->returnBtn, QChar(0xf104), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->returnBtn, QChar(0xf053), 15);
|
IconHelper::Instance()->SetIcon(ui->returnBtn, QChar(0xf053), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->appSwitchBtn, QChar(0xf24d), 15);
|
IconHelper::Instance()->SetIcon(ui->appSwitchBtn, QChar(0xf24d), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->powerBtn, QChar(0xf023), 15);
|
|
||||||
IconHelper::Instance()->SetIcon(ui->volumeUpBtn, QChar(0xf028), 15);
|
IconHelper::Instance()->SetIcon(ui->volumeUpBtn, QChar(0xf028), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->volumeDownBtn, QChar(0xf027), 15);
|
IconHelper::Instance()->SetIcon(ui->volumeDownBtn, QChar(0xf027), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->turnOnBtn, QChar(0xf09c), 15);
|
IconHelper::Instance()->SetIcon(ui->closeScreenBtn, QChar(0xf070), 15);
|
||||||
|
IconHelper::Instance()->SetIcon(ui->powerBtn, QChar(0xf011), 15);
|
||||||
IconHelper::Instance()->SetIcon(ui->expandNotifyBtn, QChar(0xf103), 15);
|
IconHelper::Instance()->SetIcon(ui->expandNotifyBtn, QChar(0xf103), 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,10 +128,10 @@ void ToolForm::on_volumeDownBtn_clicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolForm::on_turnOnBtn_clicked()
|
void ToolForm::on_closeScreenBtn_clicked()
|
||||||
{
|
{
|
||||||
if (m_videoForm) {
|
if (m_videoForm) {
|
||||||
m_videoForm->postTurnOn();
|
m_videoForm->setScreenPowerMode(ControlMsg::SPM_OFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ private slots:
|
||||||
|
|
||||||
void on_volumeDownBtn_clicked();
|
void on_volumeDownBtn_clicked();
|
||||||
|
|
||||||
void on_turnOnBtn_clicked();
|
void on_closeScreenBtn_clicked();
|
||||||
|
|
||||||
void on_expandNotifyBtn_clicked();
|
void on_expandNotifyBtn_clicked();
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="powerBtn">
|
<widget class="QPushButton" name="closeScreenBtn">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>turn off</string>
|
<string>close screen</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -64,9 +64,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="turnOnBtn">
|
<widget class="QPushButton" name="powerBtn">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>turn on</string>
|
<string>power</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
|
|
5
TODO.txt
5
TODO.txt
|
@ -11,14 +11,11 @@ b35733edb6df2a00b6af9b1c98627d344c377963
|
||||||
|
|
||||||
只录制不启动窗口(先重构,目前启动流程在videoform里)
|
只录制不启动窗口(先重构,目前启动流程在videoform里)
|
||||||
跳过帧改为动态配置,而不是静态编译 https://github.com/Genymobile/scrcpy/commit/ebccb9f6cc111e8acfbe10d656cac5c1f1b744a0
|
跳过帧改为动态配置,而不是静态编译 https://github.com/Genymobile/scrcpy/commit/ebccb9f6cc111e8acfbe10d656cac5c1f1b744a0
|
||||||
国际化
|
|
||||||
单独线程打印帧率 https://github.com/Genymobile/scrcpy/commit/e2a272bf99ecf48fcb050177113f903b3fb323c4
|
单独线程打印帧率 https://github.com/Genymobile/scrcpy/commit/e2a272bf99ecf48fcb050177113f903b3fb323c4
|
||||||
重构input
|
重构input
|
||||||
重构videoform
|
重构videoform
|
||||||
重构整个目录
|
重构整个目录
|
||||||
checkbox
|
ネコソリ
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mark:
|
mark:
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,11 @@ allprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 29
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.genymobile.scrcpy"
|
applicationId "com.genymobile.scrcpy"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 27
|
targetSdkVersion 29
|
||||||
versionCode 5
|
versionCode 5
|
||||||
versionName "1.4"
|
versionName "1.4"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
|
|
|
@ -204,7 +204,7 @@ public final class Device {
|
||||||
public void setScreenPowerMode(int mode) {
|
public void setScreenPowerMode(int mode) {
|
||||||
IBinder d = SurfaceControl.getBuiltInDisplay(0);
|
IBinder d = SurfaceControl.getBuiltInDisplay(0);
|
||||||
SurfaceControl.setDisplayPowerMode(d, mode);
|
SurfaceControl.setDisplayPowerMode(d, mode);
|
||||||
Ln.i("Device screen turned " + (mode == Device.POWER_MODE_OFF ? "off" : "on"));
|
Ln.i("Device screen turned " + (mode == Device.POWER_MODE_OFF ? "off " : "on ") + mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Rect flipRect(Rect crop) {
|
static Rect flipRect(Rect crop) {
|
||||||
|
|
BIN
third_party/scrcpy-server.jar
vendored
BIN
third_party/scrcpy-server.jar
vendored
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue