Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion panels/notification/plugin/DropShadowText.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ import org.deepin.dtk 1.0
import org.deepin.ds.notificationcenter

Text {
color: Qt.rgba(1, 1, 1, 1)
color: DTK.themeType === ApplicationHelper.DarkType ?
Qt.rgba(255, 255, 255, 0.7) :
Qt.rgba(0, 0, 0, 0.75)
Comment on lines +11 to +13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Use normalized [0,1] channel values with Qt.rgba instead of 0–255.

Qt.rgba takes channel values in the [0,1] range, so using 255 for RGB is incorrect and inconsistent with the existing 240/255.0 pattern. Please update these calls to use normalized values, e.g. Qt.rgba(1, 1, 1, 0.7) and Qt.rgba(0, 0, 0, 0.75), to avoid rendering issues and keep usage consistent.

}
6 changes: 3 additions & 3 deletions panels/notification/plugin/NotifyItemContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ NotifyItem {
id: closePlaceHolder
anchors {
top: parent.top
topMargin: -height / 2
topMargin: -height / 2 + 2
right: parent.right
rightMargin: -width / 2 + 6
}
Expand Down Expand Up @@ -149,10 +149,10 @@ NotifyItem {
color1: Palette {
normal {
common: ("transparent")
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5)
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.9)
}
normalDark {
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.5)
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.9)
}
}
color2: color1
Expand Down
4 changes: 2 additions & 2 deletions panels/notification/plugin/SettingActionButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ ActionButton {
color1: Palette {
normal {
common: ("transparent")
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.5)
crystal: Qt.rgba(240 / 255.0, 240 / 255.0, 240 / 255.0, 0.9)
}
normalDark {
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.5)
crystal: Qt.rgba(24 / 255.0, 24 / 255.0, 24 / 255.0, 0.9)
}
}

Expand Down
Loading