From 554fca5dc88da310dbe59eb8dab92f17141c1af0 Mon Sep 17 00:00:00 2001 From: renbin Date: Wed, 25 Oct 2023 10:58:50 +0800 Subject: [PATCH] fix: Build erorr under low version DTK. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 适配紧凑模式遗漏区分版本兼容宏, 修复低版本DTK下的构建错误. Log: 修复在低版本DTK的构建错误 --- src/common/utils.cpp | 2 ++ src/widgets/bottombar.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/common/utils.cpp b/src/common/utils.cpp index c3159a67..994aa593 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -1095,10 +1095,12 @@ void Utils::sendFloatMessageFixedFont(QWidget *par, const QIcon &icon, const QSt floMsg->setMessage(message); floMsg->setFont(qApp->font()); +#ifdef DTKWIDGET_CLASS_DSizeMode // 绑定 qApp 字体变更信号 QObject::connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::fontChanged, floMsg, [ = ](const QFont &font){ floMsg->setFont(font); }); +#endif DMessageManager::instance()->sendMessage(par, floMsg); } diff --git a/src/widgets/bottombar.cpp b/src/widgets/bottombar.cpp index 2c85c72d..82c277fa 100644 --- a/src/widgets/bottombar.cpp +++ b/src/widgets/bottombar.cpp @@ -419,5 +419,9 @@ void BottomBar::setEndlineMenuText(EndlineFormat format) */ int BottomBar::defaultHeight() { +#ifdef DTKWIDGET_CLASS_DSizeMode return DGuiApplicationHelper::isCompactMode() ? s_BottomBarHeightCompact : s_BottomBarHeight; +#else + return s_BottomBarHeight; +#endif }