diff --git a/QtScrcpy/res/font/fontawesome-webfont.pdf b/QtScrcpy/res/font/fontawesome-webfont.pdf new file mode 100644 index 0000000..628a4a6 Binary files /dev/null and b/QtScrcpy/res/font/fontawesome-webfont.pdf differ diff --git a/QtScrcpy/res/i18n/QtScrcpy_en.ts b/QtScrcpy/res/i18n/QtScrcpy_en.ts index a8fdbfd..28794c5 100644 --- a/QtScrcpy/res/i18n/QtScrcpy_en.ts +++ b/QtScrcpy/res/i18n/QtScrcpy_en.ts @@ -113,14 +113,22 @@ expand notify - turn off - turn off + turn off + + + turn on + turn on + + + + close screen + close screen - turn on - turn on + power + power diff --git a/QtScrcpy/res/i18n/QtScrcpy_zh.ts b/QtScrcpy/res/i18n/QtScrcpy_zh.ts index f644ad4..258ab9c 100644 --- a/QtScrcpy/res/i18n/QtScrcpy_zh.ts +++ b/QtScrcpy/res/i18n/QtScrcpy_zh.ts @@ -113,14 +113,22 @@ 下拉通知 - turn off - 锁屏 + 锁屏 + + + turn on + 解锁 + + + + close screen + 关闭屏幕 - turn on - 解锁 + power + 电源 diff --git a/QtScrcpy/toolform.cpp b/QtScrcpy/toolform.cpp index 1da83bf..d23c913 100644 --- a/QtScrcpy/toolform.cpp +++ b/QtScrcpy/toolform.cpp @@ -33,11 +33,11 @@ void ToolForm::initStyle() IconHelper::Instance()->SetIcon(ui->homeBtn, QChar(0xf1db), 15); //IconHelper::Instance()->SetIcon(ui->returnBtn, QChar(0xf104), 15); IconHelper::Instance()->SetIcon(ui->returnBtn, QChar(0xf053), 15); - IconHelper::Instance()->SetIcon(ui->appSwitchBtn, QChar(0xf24d), 15); - IconHelper::Instance()->SetIcon(ui->powerBtn, QChar(0xf023), 15); + IconHelper::Instance()->SetIcon(ui->appSwitchBtn, QChar(0xf24d), 15); IconHelper::Instance()->SetIcon(ui->volumeUpBtn, QChar(0xf028), 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); } @@ -128,10 +128,10 @@ void ToolForm::on_volumeDownBtn_clicked() } } -void ToolForm::on_turnOnBtn_clicked() +void ToolForm::on_closeScreenBtn_clicked() { if (m_videoForm) { - m_videoForm->postTurnOn(); + m_videoForm->setScreenPowerMode(ControlMsg::SPM_OFF); } } diff --git a/QtScrcpy/toolform.h b/QtScrcpy/toolform.h index 8aec54c..78baa82 100644 --- a/QtScrcpy/toolform.h +++ b/QtScrcpy/toolform.h @@ -44,7 +44,7 @@ private slots: void on_volumeDownBtn_clicked(); - void on_turnOnBtn_clicked(); + void on_closeScreenBtn_clicked(); void on_expandNotifyBtn_clicked(); diff --git a/QtScrcpy/toolform.ui b/QtScrcpy/toolform.ui index ee679a0..865db5f 100644 --- a/QtScrcpy/toolform.ui +++ b/QtScrcpy/toolform.ui @@ -54,9 +54,9 @@ - + - turn off + close screen @@ -64,9 +64,9 @@ - + - turn on + power diff --git a/TODO.txt b/TODO.txt index 1f1e7df..ea9fbb6 100644 --- a/TODO.txt +++ b/TODO.txt @@ -11,14 +11,11 @@ b35733edb6df2a00b6af9b1c98627d344c377963 ֻ¼ƲڣعĿǰvideoform ֡Ϊ̬ãǾ̬ https://github.com/Genymobile/scrcpy/commit/ebccb9f6cc111e8acfbe10d656cac5c1f1b744a0 -ʻ ̴߳ӡ֡ https://github.com/Genymobile/scrcpy/commit/e2a272bf99ecf48fcb050177113f903b3fb323c4 عinput عvideoform عĿ¼ -checkbox - - +Ⱥ mark: diff --git a/server/build.gradle b/server/build.gradle index 450067d..3dec37c 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -22,11 +22,11 @@ allprojects { } android { - compileSdkVersion 27 + compileSdkVersion 29 defaultConfig { applicationId "com.genymobile.scrcpy" minSdkVersion 21 - targetSdkVersion 27 + targetSdkVersion 29 versionCode 5 versionName "1.4" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/server/src/main/java/com/genymobile/scrcpy/Device.java b/server/src/main/java/com/genymobile/scrcpy/Device.java index 0420587..f67a5a3 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Device.java +++ b/server/src/main/java/com/genymobile/scrcpy/Device.java @@ -204,7 +204,7 @@ public final class Device { public void setScreenPowerMode(int mode) { IBinder d = SurfaceControl.getBuiltInDisplay(0); 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) { diff --git a/third_party/scrcpy-server.jar b/third_party/scrcpy-server.jar index 7abbf27..c40e753 100644 Binary files a/third_party/scrcpy-server.jar and b/third_party/scrcpy-server.jar differ