Skip to content

Commit 1834298

Browse files
committed
fix: adjust notification UI colors and positions
1. Modified DropShadowText.qml to use theme-aware text colors with appropriate opacity for better readability in both light and dark modes 2. Adjusted close button position in NotifyItemContent.qml by adding 2px offset to fix visual alignment 3. Increased opacity of crystal theme background colors from 0.5 to 0.9 in both NotifyItemContent.qml and SettingActionButton.qml for better visual contrast Log: Improved notification UI readability and visual alignment Influence: 1. Test notification display in both light and dark themes to ensure text is readable 2. Verify close button positioning aligns properly with notification items 3. Check background transparency effects in crystal theme mode 4. Test overall visual appearance of notification items and settings buttons 5. Verify UI consistency across different theme modes fix: 调整通知界面颜色和位置 1. 修改 DropShadowText.qml 使用主题感知的文本颜色,在亮色和暗色模式下都 提供更好的可读性 2. 调整 NotifyItemContent.qml 中关闭按钮位置,添加2像素偏移以修复视觉对 齐问题 3. 将 NotifyItemContent.qml 和 SettingActionButton.qml 中的水晶主题背景 颜色透明度从0.5增加到0.9,以获得更好的视觉对比度 Log: 改进通知界面可读性和视觉对齐 Influence: 1. 测试亮色和暗色主题下的通知显示,确保文本可读性 2. 验证关闭按钮位置是否与通知项正确对齐 3. 检查水晶主题模式下的背景透明度效果 4. 测试通知项和设置按钮的整体视觉外观 5. 验证不同主题模式下的界面一致性
1 parent 9ff9858 commit 1834298

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

panels/notification/plugin/DropShadowText.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ import org.deepin.dtk 1.0
88
import org.deepin.ds.notificationcenter
99

1010
Text {
11-
color: Qt.rgba(1, 1, 1, 1)
11+
color: DTK.themeType === ApplicationHelper.DarkType ?
12+
Qt.rgba(255, 255, 255, 0.7) :
13+
Qt.rgba(0, 0, 0, 0.75)
1214
}

panels/notification/plugin/NotifyItemContent.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ NotifyItem {
102102
id: closePlaceHolder
103103
anchors {
104104
top: parent.top
105-
topMargin: -height / 2
105+
topMargin: -height / 2 + 2
106106
right: parent.right
107107
rightMargin: -width / 2 + 6
108108
}
@@ -149,10 +149,10 @@ NotifyItem {
149149
color1: Palette {
150150
normal {
151151
common: ("transparent")
152-
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5)
152+
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.9)
153153
}
154154
normalDark {
155-
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.5)
155+
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.9)
156156
}
157157
}
158158
color2: color1

panels/notification/plugin/SettingActionButton.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ ActionButton {
3636
color1: Palette {
3737
normal {
3838
common: ("transparent")
39-
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5)
39+
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.9)
4040
}
4141
normalDark {
42-
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.5)
42+
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.9)
4343
}
4444
}
4545

0 commit comments

Comments
 (0)