mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-10 09:28:40 +00:00
update:
调整关闭屏幕和电源按钮的功能实现 安卓targetsdk更新到29
This commit is contained in:
parent
278d153f0e
commit
299cbb5c28
9 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>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../toolform.ui" line="59"/>
|
||||
<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>
|
||||
<location filename="../../toolform.ui" line="69"/>
|
||||
<source>turn on</source>
|
||||
<translation>turn on</translation>
|
||||
<source>power</source>
|
||||
<translation>power</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../toolform.ui" line="79"/>
|
||||
|
|
|
@ -113,14 +113,22 @@
|
|||
<translation>下拉通知</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../toolform.ui" line="59"/>
|
||||
<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>
|
||||
<location filename="../../toolform.ui" line="69"/>
|
||||
<source>turn on</source>
|
||||
<translation>解锁</translation>
|
||||
<source>power</source>
|
||||
<translation>电源</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../toolform.ui" line="79"/>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ private slots:
|
|||
|
||||
void on_volumeDownBtn_clicked();
|
||||
|
||||
void on_turnOnBtn_clicked();
|
||||
void on_closeScreenBtn_clicked();
|
||||
|
||||
void on_expandNotifyBtn_clicked();
|
||||
|
||||
|
|
|
@ -54,9 +54,9 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="powerBtn">
|
||||
<widget class="QPushButton" name="closeScreenBtn">
|
||||
<property name="toolTip">
|
||||
<string>turn off</string>
|
||||
<string>close screen</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
@ -64,9 +64,9 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="turnOnBtn">
|
||||
<widget class="QPushButton" name="powerBtn">
|
||||
<property name="toolTip">
|
||||
<string>turn on</string>
|
||||
<string>power</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
|
5
TODO.txt
5
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:
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue