diff --git a/QtScrcpy/ui/videoform.cpp b/QtScrcpy/ui/videoform.cpp index d5b43b0..085c847 100644 --- a/QtScrcpy/ui/videoform.cpp +++ b/QtScrcpy/ui/videoform.cpp @@ -21,7 +21,7 @@ #include "ui_videoform.h" #include "videoform.h" -VideoForm::VideoForm(bool framelessWindow, bool skin, bool showToolbar,QWidget *parent) : QWidget(parent), ui(new Ui::videoForm), m_skin(skin) +VideoForm::VideoForm(bool framelessWindow, bool skin, bool showToolbar, QWidget *parent) : QWidget(parent), ui(new Ui::videoForm), m_skin(skin) { ui->setupUi(this); initUI(); @@ -480,7 +480,7 @@ void VideoForm::switchFullScreen() if (m_skin) { updateStyleSheet(m_frameSize.height() > m_frameSize.width()); } - showToolForm(true); + showToolForm(this->show_toolbar); #ifdef Q_OS_WIN32 ::SetThreadExecutionState(ES_CONTINUOUS); #endif @@ -722,7 +722,7 @@ void VideoForm::paintEvent(QPaintEvent *paint) void VideoForm::showEvent(QShowEvent *event) { Q_UNUSED(event) - if (!isFullScreen()) { + if (!isFullScreen() && this->show_toolbar) { QTimer::singleShot(500, this, [this](){ showToolForm(this->show_toolbar); }); diff --git a/QtScrcpy/ui/videoform.h b/QtScrcpy/ui/videoform.h index 08d73d8..75b032a 100644 --- a/QtScrcpy/ui/videoform.h +++ b/QtScrcpy/ui/videoform.h @@ -19,7 +19,7 @@ class VideoForm : public QWidget, public qsc::DeviceObserver { Q_OBJECT public: - explicit VideoForm(bool framelessWindow = false, bool skin = true, bool showToolBar = false,QWidget *parent = 0); + explicit VideoForm(bool framelessWindow = false, bool skin = true, bool showToolBar = true, QWidget *parent = 0); ~VideoForm(); void staysOnTop(bool top = true); diff --git a/QtScrcpy/util/config.cpp b/QtScrcpy/util/config.cpp index 6885324..5915cf2 100644 --- a/QtScrcpy/util/config.cpp +++ b/QtScrcpy/util/config.cpp @@ -166,7 +166,7 @@ void Config::setUserBootConfig(const UserBootConfig &config) m_userData->setValue(COMMON_KEEP_ALIVE_KEY, config.keepAlive); m_userData->setValue(COMMON_SIMPLE_MODE_KEY, config.simpleMode); m_userData->setValue(COMMON_AUTO_UPDATE_DEVICE_KEY, config.autoUpdateDevice); - m_userData->setValue(COMMON_SHOW_TOOLBAR_KEY,config.showToolbar); + m_userData->setValue(COMMON_SHOW_TOOLBAR_KEY, config.showToolbar); m_userData->endGroup(); m_userData->sync(); }