Skip to content

Commit 683147b

Browse files
committed
fix: use active color as fallback for dark active color in treeland
Treeland platform does not provide a separate dark active color property. When the system theme is set to dark mode, the dark active color was returning an invalid default value, causing the active color to appear blank or invisible. This fix returns the regular active color as a fallback, ensuring consistent visual appearance in dark themes. Log: Fixed dark active color display issue in treeland platform Influence: 1. Test active color display in light theme mode 2. Test active color display in dark theme mode 3. Verify that active color is visible and correct in both themes 4. Check color consistency when switching between light and dark themes fix: 修复treeland平台暗色主题下活动色无效的问题 Treeland平台没有提供独立的暗色主题活动色属性。当系统主题切换为暗色模式 时,暗色活动色返回了无效的默认值,导致活动色显示为空白或不可见。此修复将 常规活动色作为暗色活动色的回退值,确保在暗色主题下保持一致的视觉表现。 Log: 修复treeland平台暗色主题活动色显示问题 Influence: 1. 测试浅色主题模式下的活动色显示 2. 测试暗色主题模式下的活动色显示 3. 验证两种主题下活动色均可见且正确 4. 检查在切换深浅色主题时颜色的表现一致性 PMS: BUG-344937
1 parent 9f2e613 commit 683147b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/plugins/platform/treeland/dtreelandplatforminterface.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ QColor DTreelandPlatformInterface::activeColor() const
7272
return m_activeColor;
7373
}
7474

75+
QColor DTreelandPlatformInterface::darkActiveColor() const
76+
{
77+
// treeland does not provide dark active color, return active color as fallback
78+
return m_activeColor;
79+
}
80+
7581
QByteArray DTreelandPlatformInterface::themeName() const
7682
{
7783
return m_themeName;

src/plugins/platform/treeland/dtreelandplatforminterface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class DTreelandPlatformInterface : public QObject, public DPlatformInterface, pu
3333
QByteArray monoFontName() const override;
3434
qreal fontPointSize() const override;
3535
QColor activeColor() const override;
36+
QColor darkActiveColor() const override;
3637
QByteArray themeName() const override;
3738

3839
int windowRadius() const override;

0 commit comments

Comments
 (0)