Modify the code as required.

This commit is contained in:
fanxing 2024-09-23 12:48:46 +08:00
commit 985c57a198
3 changed files with 5 additions and 5 deletions

View file

@ -480,7 +480,7 @@ void VideoForm::switchFullScreen()
if (m_skin) { if (m_skin) {
updateStyleSheet(m_frameSize.height() > m_frameSize.width()); updateStyleSheet(m_frameSize.height() > m_frameSize.width());
} }
showToolForm(true); showToolForm(this->show_toolbar);
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
::SetThreadExecutionState(ES_CONTINUOUS); ::SetThreadExecutionState(ES_CONTINUOUS);
#endif #endif
@ -722,7 +722,7 @@ void VideoForm::paintEvent(QPaintEvent *paint)
void VideoForm::showEvent(QShowEvent *event) void VideoForm::showEvent(QShowEvent *event)
{ {
Q_UNUSED(event) Q_UNUSED(event)
if (!isFullScreen()) { if (!isFullScreen() && this->show_toolbar) {
QTimer::singleShot(500, this, [this](){ QTimer::singleShot(500, this, [this](){
showToolForm(this->show_toolbar); showToolForm(this->show_toolbar);
}); });

View file

@ -19,7 +19,7 @@ class VideoForm : public QWidget, public qsc::DeviceObserver
{ {
Q_OBJECT Q_OBJECT
public: 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(); ~VideoForm();
void staysOnTop(bool top = true); void staysOnTop(bool top = true);