Skip to content

Commit

Permalink
fix: Build erorr under low version DTK.
Browse files Browse the repository at this point in the history
适配紧凑模式遗漏区分版本兼容宏,
修复低版本DTK下的构建错误.

Log: 修复在低版本DTK的构建错误
  • Loading branch information
rb-union committed Oct 25, 2023
1 parent 533a79a commit 554fca5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
4 changes: 4 additions & 0 deletions src/widgets/bottombar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 554fca5

Please sign in to comment.