Skip to content

Commit 8854086

Browse files
committed
style: adjust button background colors for better visual consistency
Updated button background color definitions in FlowStyle.qml to improve visual consistency across different themes and states. Changed crystal theme colors to use simplified RGBA values (0,0,0 instead of 16/255) for better maintainability. Added missing hoveredDark and pressedDark states for crystal theme to ensure proper dark mode support. Adjusted opacity values for better contrast and visual hierarchy in both light and dark themes. Log: Improved button visual appearance in different themes style: 调整按钮背景颜色以提升视觉一致性 更新了 FlowStyle.qml 中的按钮背景颜色定义,以改善不同主题和状态下的视觉 一致性。将水晶主题颜色改为使用简化的 RGBA 值(0,0,0 替代 16/255)以提高 可维护性。为水晶主题添加了缺失的 hoveredDark 和 pressedDark 状态,确保正 确的深色模式支持。调整了透明度值以在浅色和深色主题中获得更好的对比度和视 觉层次。 Log: 改进了不同主题下按钮的视觉外观 PMS: BUG-268509 BUG-327451
1 parent cb811c0 commit 8854086

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

qt6/src/qml/FlowStyle.qml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,23 @@ QtObject {
108108
}
109109
normalDark {
110110
common: Qt.rgba(1, 1, 1, 0.1)
111-
crystal: Qt.rgba(1, 1, 1, 0.1)
111+
crystal: Qt.rgba(1, 1, 1, 0.08)
112112
}
113113
hovered {
114114
common: ("#e1e1e1")
115-
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 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 {
118122
common: ("#bcc4d0")
119-
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 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)