Skip to content

Commit

Permalink
feat: 适配社区版5.15环境下调色板问题
Browse files Browse the repository at this point in the history
qt5.12中新增了PlaceholderText颜色,添加与5.11
颜色一致的对应颜色到此调色板中。使风格保持一致

Log:
Bug: https://pms.uniontech.com/zentao/bug-view-66654.html
Change-Id: I247d1619b9ec24582c09945bb2b3f4cd913fd4f5
(cherry picked from commit b27f489)
  • Loading branch information
Chen Bin authored and kegechen committed Mar 24, 2021
1 parent f384665 commit f14430a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/kernel/dguiapplicationhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,13 @@ DPalette DGuiApplicationHelper::standardPalette(DGuiApplicationHelper::ColorType
QPalette::ColorRole role = static_cast<QPalette::ColorRole>(i);
QColor color = qcolor_list[i];

#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
if (role == QPalette::PlaceholderText) {
// 5.15新添加此颜色 这里使用5.11的颜色保证效果与5.11对齐
color = dcolor_list[DPalette::PlaceholderText];
continue;
}
#endif
// 处理半透明色
if (allowCompositingColor) {
switch (role) {
Expand Down

0 comments on commit f14430a

Please sign in to comment.