diff --git a/QtScrcpy/device/device.cpp b/QtScrcpy/device/device.cpp
index 5cb0396..a0bda6b 100644
--- a/QtScrcpy/device/device.cpp
+++ b/QtScrcpy/device/device.cpp
@@ -35,7 +35,7 @@ Device::Device(DeviceParams params, QObject *parent)
m_decoder = new Decoder(m_vb, this);
m_fileHandler = new FileHandler(this);
m_controller = new Controller(params.gameScript, this);
- m_videoForm = new VideoForm(Config::getInstance().getSkin());
+ m_videoForm = new VideoForm(Config::getInstance().getFramelessWindow(), Config::getInstance().getSkin());
m_videoForm->setDevice(this);
}
diff --git a/QtScrcpy/device/ui/videoform.cpp b/QtScrcpy/device/ui/videoform.cpp
index 223897d..8fea7db 100644
--- a/QtScrcpy/device/ui/videoform.cpp
+++ b/QtScrcpy/device/ui/videoform.cpp
@@ -25,7 +25,7 @@ extern "C"
#include "libavutil/frame.h"
}
-VideoForm::VideoForm(bool skin, QWidget *parent)
+VideoForm::VideoForm(bool framelessWindow, bool skin, QWidget *parent)
: QWidget(parent)
, ui(new Ui::videoForm)
, m_skin(skin)
@@ -38,6 +38,9 @@ VideoForm::VideoForm(bool skin, QWidget *parent)
if (m_skin) {
updateStyleSheet(vertical);
}
+ if (framelessWindow) {
+ setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
+ }
}
VideoForm::~VideoForm()
diff --git a/QtScrcpy/device/ui/videoform.h b/QtScrcpy/device/ui/videoform.h
index 9de6438..c3b4fc6 100644
--- a/QtScrcpy/device/ui/videoform.h
+++ b/QtScrcpy/device/ui/videoform.h
@@ -17,7 +17,7 @@ class VideoForm : public QWidget
{
Q_OBJECT
public:
- explicit VideoForm(bool skin = true, QWidget *parent = 0);
+ explicit VideoForm(bool framelessWindow = false, bool skin = true, QWidget *parent = 0);
~VideoForm();
void staysOnTop(bool top = true);
diff --git a/QtScrcpy/dialog.cpp b/QtScrcpy/dialog.cpp
index 938b6d5..3aa54bb 100644
--- a/QtScrcpy/dialog.cpp
+++ b/QtScrcpy/dialog.cpp
@@ -98,6 +98,7 @@ void Dialog::initUI()
ui->formatBox->setCurrentIndex(Config::getInstance().getRecordFormatIndex());
ui->recordPathEdt->setText(Config::getInstance().getRecordPath());
+ ui->framelessCheck->setChecked(Config::getInstance().getFramelessWindow());
#ifdef Q_OS_OSX
// mac need more width
@@ -384,3 +385,9 @@ void Dialog::on_formatBox_activated(int index)
{
Config::getInstance().setRecordFormatIndex(index);
}
+
+void Dialog::on_framelessCheck_stateChanged(int arg1)
+{
+ Q_UNUSED(arg1)
+ Config::getInstance().setFramelessWindow(ui->framelessCheck->isChecked());
+}
diff --git a/QtScrcpy/dialog.h b/QtScrcpy/dialog.h
index a55361f..2b871a3 100644
--- a/QtScrcpy/dialog.h
+++ b/QtScrcpy/dialog.h
@@ -62,6 +62,8 @@ private slots:
void on_formatBox_activated(int index);
+ void on_framelessCheck_stateChanged(int arg1);
+
private:
bool checkAdbRun();
void initUI();
diff --git a/QtScrcpy/dialog.ui b/QtScrcpy/dialog.ui
index f22349b..9060e15 100644
--- a/QtScrcpy/dialog.ui
+++ b/QtScrcpy/dialog.ui
@@ -215,6 +215,22 @@
+ -
+
+
+
+ 0
+ 0
+
+
+
+ always on top
+
+
+ false
+
+
+
-
@@ -228,22 +244,6 @@
- -
-
-
-
- 0
- 0
-
-
-
- background record
-
-
- false
-
-
-
-
@@ -260,8 +260,8 @@
- -
-
+
-
+
0
@@ -269,13 +269,20 @@
- always on top
+ background record
-
+
false
+ -
+
+
+ frameless
+
+
+
diff --git a/QtScrcpy/res/i18n/QtScrcpy_en.qm b/QtScrcpy/res/i18n/QtScrcpy_en.qm
index d6717b1..d68f816 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 f158eee..9592331 100644
--- a/QtScrcpy/res/i18n/QtScrcpy_en.ts
+++ b/QtScrcpy/res/i18n/QtScrcpy_en.ts
@@ -16,22 +16,22 @@
file transfer failed
-
+
install apk
install apk
-
+
file transfer
file transfer
-
+
wait current %1 to complete
wait current %1 to complete
-
+
%1 complete, save in %2
%1 complete, save in %2
@@ -41,7 +41,7 @@
%1 complete\n save in %2
-
+
%1 failed
%1 failed
@@ -49,17 +49,17 @@
Dialog
-
+
Wireless
Wireless
-
+
wireless connect
wireless connect
-
+
wireless disconnect
wireless disconnect
@@ -75,7 +75,7 @@
-
+
select path
select path
@@ -90,27 +90,32 @@
record screen
-
+
+ frameless
+ frameless
+
+
+
stop all server
stop all server
-
+
adb command:
adb command:
-
+
terminate
terminate
-
+
execute
execute
-
+
clear
clear
@@ -124,12 +129,12 @@
auto enable
-
+
background record
background record
-
+
screen-off
screen-off
@@ -144,7 +149,7 @@
max size:
-
+
always on top
always on top
@@ -154,27 +159,27 @@
refresh script
-
+
get device IP
get device IP
-
+
USB line
USB line
-
+
stop server
stop server
-
+
start server
start server
-
+
device serial:
device serial:
@@ -188,12 +193,12 @@
bit rate:
-
+
start adbd
start adbd
-
+
refresh devices
refresh devices
@@ -206,7 +211,7 @@
QObject
-
+
This software is completely open source and free, you can download it at the following address:
This software is completely open source and free, you can download it at the following address:
@@ -219,12 +224,12 @@
Tool
-
+
full screen
full screen
-
+
expand notify
expand notify
@@ -237,52 +242,52 @@
turn on
-
+
touch switch
touch switch
-
+
close screen
close screen
-
+
power
power
-
+
volume up
volume up
-
+
volume down
volume down
-
+
app switch
app switch
-
+
menu
menu
-
+
home
home
-
+
return
return
-
+
screen shot
screen shot
@@ -302,7 +307,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 3552ab7..7bcbdad 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 5001248..f3e0056 100644
--- a/QtScrcpy/res/i18n/QtScrcpy_zh.ts
+++ b/QtScrcpy/res/i18n/QtScrcpy_zh.ts
@@ -16,22 +16,22 @@
文件传输失败
-
+
install apk
安装apk
-
+
file transfer
文件传输
-
+
wait current %1 to complete
等待当前%1完成
-
+
%1 complete, save in %2
%1完成,保存在%2
@@ -41,7 +41,7 @@
%1完成\n 保存在 %2
-
+
%1 failed
%1 失败
@@ -49,17 +49,17 @@
Dialog
-
+
Wireless
无线
-
+
wireless connect
无线连接
-
+
wireless disconnect
无线断开
@@ -75,7 +75,7 @@
-
+
select path
选择路径
@@ -90,27 +90,32 @@
录制屏幕
-
+
+ frameless
+ 无边框
+
+
+
stop all server
停止所有服务
-
+
adb command:
adb命令:
-
+
terminate
终止
-
+
execute
执行
-
+
clear
清理
@@ -124,12 +129,12 @@
自动启用脚本
-
+
background record
后台录制
-
+
screen-off
自动息屏
@@ -144,7 +149,7 @@
最大尺寸:
-
+
always on top
窗口置顶
@@ -154,27 +159,27 @@
刷新脚本
-
+
get device IP
获取设备IP
-
+
USB line
USB线
-
+
stop server
停止服务
-
+
start server
启动服务
-
+
device serial:
设备序列号:
@@ -188,12 +193,12 @@
比特率:
-
+
start adbd
启动adbd
-
+
refresh devices
刷新设备列表
@@ -206,7 +211,7 @@
QObject
-
+
This software is completely open source and free, you can download it at the following address:
本软件完全开源免费,你可以在下面的地址下载:
@@ -219,12 +224,12 @@
工具
-
+
full screen
全屏
-
+
expand notify
下拉通知
@@ -237,52 +242,52 @@
解锁
-
+
touch switch
触摸显示开关
-
+
close screen
关闭屏幕
-
+
power
电源
-
+
volume up
音量加
-
+
volume down
音量减
-
+
app switch
切换应用
-
+
menu
菜单
-
+
home
主界面
-
+
return
返回
-
+
screen shot
截图
@@ -302,7 +307,7 @@
文件传输失败
-
+
file does not exist
文件不存在
diff --git a/QtScrcpy/util/config.cpp b/QtScrcpy/util/config.cpp
index 2f7b0a7..ea39ea7 100644
--- a/QtScrcpy/util/config.cpp
+++ b/QtScrcpy/util/config.cpp
@@ -50,6 +50,9 @@
#define SERIAL_WINDOW_RECT_KEY_H "WindowRectH"
#define SERIAL_WINDOW_RECT_KEY_DEF -1
+#define COMMON_FRAMELESS_WINDOW_KEY "FramelessWindow"
+#define COMMON_FRAMELESS_WINDOW_DEF false
+
// 最大尺寸 录制格式
QString Config::s_configPath = "";
@@ -169,6 +172,22 @@ QRect Config::getRect(const QString &serial)
return rc;
}
+void Config::setFramelessWindow(bool frameless)
+{
+ m_userData->beginGroup(GROUP_COMMON);
+ m_userData->setValue(COMMON_FRAMELESS_WINDOW_KEY, frameless);
+ m_userData->endGroup();
+}
+
+bool Config::getFramelessWindow()
+{
+ bool framelessWindow = false;
+ m_userData->beginGroup(GROUP_COMMON);
+ framelessWindow = m_userData->value(COMMON_FRAMELESS_WINDOW_KEY, COMMON_FRAMELESS_WINDOW_DEF).toBool();
+ m_userData->endGroup();
+ return framelessWindow;
+}
+
QString Config::getServerVersion()
{
QString server;
diff --git a/QtScrcpy/util/config.h b/QtScrcpy/util/config.h
index e635278..28cfec2 100644
--- a/QtScrcpy/util/config.h
+++ b/QtScrcpy/util/config.h
@@ -32,6 +32,8 @@ public:
void setRecordFormatIndex(int recordFormatIndex);
void setRect(const QString &serial, const QRect &rc);
QRect getRect(const QString &serial);
+ bool getFramelessWindow();
+ void setFramelessWindow(bool frameless);
private:
explicit Config(QObject *parent = nullptr);
diff --git a/README.md b/README.md
index 742b7df..4003f8e 100644
--- a/README.md
+++ b/README.md
@@ -226,7 +226,7 @@ There are several reasons listed as below according to importance (high to low).
All the dependencies are provided and it is easy to compile.
### PC client
-1. Set up the Qt development environment on the target platform (Qt >= 5.9.7, vs >= 2015 (mingw not supported))
+1. Set up the Qt development environment on the target platform (Qt >= 5.12.0, vs >= 2017 (mingw not supported))
2. Clone the project
3. Open the project root directory all.pro with QtCreator
4. Compile and run
diff --git a/README_zh.md b/README_zh.md
index 12d63ad..f1c6dcc 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -226,7 +226,7 @@ Mac OS平台,你可以直接使用我编译好的可执行程序:
尽量提供了所有依赖资源,方便傻瓜式编译。
### PC端
-1. 目标平台上搭建Qt开发环境(Qt >= 5.9.7, vs >= 2015 (**不支持mingw**))
+1. 目标平台上搭建Qt开发环境(Qt >= 5.12.0, vs >= 2017 (**不支持mingw**))
2. 克隆该项目
3. 使用QtCreator打开项目根目录all.pro
4. 编译,运行即可