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) {
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);
});

View file

@ -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);