Skip to content

Commit be3cb6f

Browse files
committed
style: adjust UI color palette values
Updated the color palette values in FlowStyle.qml to improve visual consistency and dark mode support. Changes include: 1. Modified background1 colors to use rgba values for better transparency control 2. Added missing hoveredDark and pressedDark states for dark mode 3. Adjusted crystal theme colors to match dark/light mode requirements 4. Unified color handling between common and crystal themes 5. Improved highlight color states for better visual feedback Log: Improved UI color consistency across themes and states Influence: 1. Verify all UI elements render correctly in both light and dark modes 2. Check hover and pressed states for interactive elements 3. Test color transitions between different states 4. Validate accessibility and contrast ratios 5. Ensure consistency across different display configurations style: 调整UI调色板数值 更新了FlowStyle.qml中的调色板数值以提高视觉一致性和暗黑模式支持。修改 包括: 1. 修改background1颜色使用rgba值以获得更好的透明度控制 2. 为暗黑模式添加缺失的hoveredDark和pressedDark状态 3. 调整crystal主题颜色以匹配暗黑/明亮模式需求 4. 统一common和crystal主题的颜色处理 5. 改进高亮颜色状态以获得更好的视觉反馈 Log: 改进了跨主题和状态的UI颜色一致性 Influence: 1. 验证所有UI元素在明亮和暗黑模式下都能正确渲染 2. 检查交互元素的悬停和按下状态 3. 测试不同状态之间的颜色过渡 4. 验证可访问性和对比度比率 5. 确保在不同显示配置下的一致性 PMS: BUG-327451
1 parent 306320f commit be3cb6f

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

qt6/src/qml/FlowStyle.qml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,28 @@ QtObject {
103103

104104
property D.Palette background1: D.Palette {
105105
normal {
106-
common: ("#f7f7f7")
106+
common: Qt.rgba(0, 0, 0, 0.1)
107107
crystal: Qt.rgba(0, 0, 0, 0.1)
108108
}
109109
normalDark {
110-
common: Qt.rgba(1, 1, 1, 0.1)
111-
crystal: Qt.rgba(1, 1, 1, 0.1)
110+
common: Qt.rgba(1, 1, 1, 0.08)
111+
crystal: Qt.rgba(1, 1, 1, 0.08)
112112
}
113113
hovered {
114-
common: ("#e1e1e1")
115-
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2)
114+
common: Qt.rgba(0, 0, 0, 0.2)
115+
crystal: Qt.rgba(0, 0, 0, 0.2)
116+
}
117+
hoveredDark {
118+
common: Qt.rgba(1, 1, 1, 0.2)
119+
crystal: Qt.rgba(1, 1, 1, 0.2)
116120
}
117121
pressed {
118-
common: ("#bcc4d0")
119-
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.15)
122+
common: Qt.rgba(0, 0, 0, 0.15)
123+
crystal: Qt.rgba(0, 0, 0, 0.15)
124+
}
125+
pressedDark {
126+
common: Qt.rgba(1, 1, 1, 0.05)
127+
crystal: Qt.rgba(1, 1, 1, 0.05)
120128
}
121129
}
122130

@@ -207,21 +215,23 @@ QtObject {
207215
}
208216
normalDark {
209217
common: D.DTK.makeColor(D.Color.Highlight).saturation(+10).lightness(+10)
210-
crystal: Qt.rgba(0, 0, 0, 0.1)
218+
crystal: Qt.rgba(1, 1, 1, 0.08)
211219
}
212220
hovered {
213221
common: D.DTK.makeColor(D.Color.Highlight).lightness(+10).saturation(+20).lightness(+10)
214-
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2)
222+
crystal: Qt.rgba(0, 0, 0, 0.2)
215223
}
216224
hoveredDark {
217225
common: D.DTK.makeColor(D.Color.Highlight).lightness(+10).saturation(+30).lightness(+10)
226+
crystal: Qt.rgba(1, 1, 1, 0.2)
218227
}
219228
pressed {
220229
common: D.DTK.makeColor(D.Color.Highlight).lightness(-10).saturation(+8).lightness(-8)
221230
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.15)
222231
}
223232
pressedDark {
224233
common: D.DTK.makeColor(D.Color.Highlight).saturation(+10).lightness(+2)
234+
crystal: Qt.rgba(1, 1, 1, 0.05)
225235
}
226236
disabled {
227237
common: D.DTK.makeColor(D.Color.Highlight).saturation(+22).lightness(+14)

0 commit comments

Comments
 (0)