Commit 7881c6c
committed
fix: handle inactive state colors in DQuickControlPalette
Added support for inactive state color handling in
DQuickControlColorSelector::getColorOf method. When the control state
is inactive and the system attribute UseInactiveColorGroup is enabled,
the function now applies an inactive color mask similar to dtkgui's
generatePaletteColor_helper implementation. The inactive color is
generated by blending the original color with a window color-based mask
that has different alpha values for dark (0.6) and light (0.4) themes,
ensuring proper visual appearance for inactive controls.
Log: Fixed inactive state color handling in DQuickControlPalette
Influence:
1. Test UI controls in inactive state with both dark and light themes
2. Verify inactive controls display properly dimmed colors
3. Check that active controls remain unaffected by the inactive color
processing
4. Test with UseInactiveColorGroup attribute enabled and disabled
5. Verify color consistency across different control types and states
fix: 在DQuickControlPalette中处理非活动状态颜色
在DQuickControlColorSelector::getColorOf方法中添加了对非活动状态颜色处理
的支持。当控件状态为非活动状态且系统属性UseInactiveColorGroup启用时,该
函数现在会应用类似于dtkgui的generatePaletteColor_helper实现的非活动颜色
遮罩。通过将原始颜色与基于窗口颜色的遮罩进行混合来生成非活动颜色,该遮罩
针对深色(0.6)和浅色(0.4)主题具有不同的alpha值,确保非活动控件的正确
视觉外观。
Log: 修复了DQuickControlPalette中非活动状态颜色处理问题
Influence:
1. 测试深色和浅色主题下的非活动状态UI控件
2. 验证非活动控件正确显示变暗的颜色
3. 检查活动控件不受非活动颜色处理的影响
4. 测试启用和禁用UseInactiveColorGroup属性时的情况
5. 验证不同控件类型和状态下的颜色一致性
PMS: BUG-2985691 parent 526fa2c commit 7881c6c
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
845 | 856 | | |
846 | 857 | | |
847 | 858 | | |
| |||
0 commit comments