Skip to content

Commit

Permalink
fix: add dtkgui version control for openning window effect
Browse files Browse the repository at this point in the history
Log: add dtkgui version control for openning window effect.
Task: https://pms.uniontech.com/bug-view-244347.html
  • Loading branch information
N0rthHXD committed Apr 8, 2024
1 parent 53d3b2c commit d4f1d29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/grand-search/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <QScreen>
#include <QKeyEvent>

#include <dtkgui_config.h>

DWIDGET_USE_NAMESPACE
using namespace GrandSearch;

Expand Down Expand Up @@ -189,8 +191,12 @@ void MainWindow::initUI()
}
qDebug() << "current platform name:" << QApplication::platformName() << " flags:" << this->windowFlags();

DPlatformWindowHandle *windowHandle = new DPlatformWindowHandle(this);
windowHandle->setWindowStartUpEffect(DPlatformHandle::EffectType::EffectNormal);
#ifdef DTKGUI_VERSION_STR
#if (DTK_VERSION_CHECK(DTKGUI_VERSION_MAJOR, DTKGUI_VERSION_MINOR, DTKGUI_VERSION_PATCH, DTKGUI_VERSION_BUILD) > DTK_VERSION_CHECK(5, 6, 9, 4))
DPlatformWindowHandle *windowHandle = new DPlatformWindowHandle(this, this);
windowHandle->setWindowStartUpEffect(DPlatformHandle::EffectType::EffectNormal);
#endif
#endif

// 控制界面大小和位置
setFixedSize(MainWindowWidth, MainWindowHeight);
Expand Down

0 comments on commit d4f1d29

Please sign in to comment.