Skip to content

Commit 1938ef3

Browse files
18202781743deepin-bot[bot]
authored andcommitted
fix: adjust UI for osd
1.Update icons. 2.Update background of Window. 3.Update items background for listview. pms: BUG-311127
1 parent 3d71c1a commit 1938ef3

File tree

8 files changed

+34
-16
lines changed

8 files changed

+34
-16
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

panels/notification/osd/displaymode/package/main.qml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,20 @@ AppletItem {
5757
palette.windowText: undefined
5858

5959
property D.Palette backgroundColor: D.Palette {
60-
normal: Qt.rgba(1, 1, 1, 0.4)
61-
normalDark: Qt.rgba(0, 0, 0, 0.4)
60+
normal: Qt.rgba(1, 1, 1, 0.3)
61+
normalDark: Qt.rgba(0, 0, 0, 0.3)
6262
}
6363
property D.Palette checkedBackgroundColor: D.Palette {
6464
normal: Qt.rgba(1, 1, 1, 0.6)
6565
normalDark: Qt.rgba(0, 0, 0, 0.6)
6666
}
6767
property D.Palette dropShadowColor: D.Palette {
6868
normal: Qt.rgba(0, 0, 0, 0.1)
69-
normalDark: Qt.rgba(1, 1, 1, 0.1)
69+
normalDark: Qt.rgba(0, 0, 0, 0.7)
7070
}
71-
property D.Palette innerShadowColor: D.Palette {
71+
property D.Palette innerShadowColor: D.Palette {
7272
normal: Qt.rgba(1, 1, 1, 0.2)
73-
normalDark: Qt.rgba(0, 0, 0, 0.2)
73+
normalDark: Qt.rgba(1, 1, 1, 0.03)
7474
}
7575

7676
property bool isCurrent: Applet.currentPlanItem && Applet.currentPlanItem.key === model.key
@@ -95,7 +95,7 @@ AppletItem {
9595
font: D.DTK.fontManager.t5
9696
Layout.alignment: Qt.AlignVCenter
9797
text: model.text
98-
color: Applet.currentPlanItem && Applet.currentPlanItem.key === model.key ? D.DTK.platformTheme.activeColor : palette.windowText
98+
color: palette.windowText
9999
}
100100

101101
Item {
@@ -125,6 +125,7 @@ AppletItem {
125125
: itemView.D.ColorSelector.backgroundColor
126126
}
127127
D.BoxShadow {
128+
visible: !itemView.isCurrent
128129
anchors.fill: parent
129130
shadowOffsetX: 0
130131
shadowOffsetY: 1
@@ -135,6 +136,7 @@ AppletItem {
135136
hollow: true
136137
}
137138
D.BoxInsetShadow {
139+
visible: !itemView.isCurrent
138140
anchors.fill: parent
139141
shadowOffsetX: 0
140142
shadowOffsetY: 1

panels/notification/osd/kblayout/package/main.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ AppletItem {
6969
}
7070
property D.Palette dropShadowColor: D.Palette {
7171
normal: Qt.rgba(0, 0, 0, 0.1)
72-
normalDark: Qt.rgba(1, 1, 1, 0.1)
72+
normalDark: Qt.rgba(0, 0, 0, 0.7)
7373
}
74-
property D.Palette innerShadowColor: D.Palette {
74+
property D.Palette innerShadowColor: D.Palette {
7575
normal: Qt.rgba(1, 1, 1, 0.2)
76-
normalDark: Qt.rgba(0, 0, 0, 0.2)
76+
normalDark: Qt.rgba(1, 1, 1, 0.03)
7777
}
7878

7979
property bool isCurrent: Applet.currentLayout === model.key

panels/notification/osd/package/main.qml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ Window {
5656
background: D.FloatingPanel {
5757
implicitWidth: 100
5858
implicitHeight: 40
59+
backgroundColor: D.Palette {
60+
normal: Qt.rgba(247 / 255.0, 247 / 255.0, 247 / 255.0, 0.4)
61+
normalDark: Qt.rgba(0, 0, 0, 0.6)
62+
}
63+
insideBorderColor: D.Palette {
64+
normal: Qt.rgba(1, 0, 0, 0.3)
65+
normalDark: Qt.rgba(1, 1, 1, 0.1)
66+
}
67+
outsideBorderColor: D.Palette {
68+
normal: Qt.rgba(1, 1, 0, 0.1)
69+
normalDark: Qt.rgba(0, 0, 0, 0.7)
70+
}
71+
dropShadowColor: null
5972
}
6073
}
6174
}

panels/notification/osd/windoweffect/package/main.qml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,23 @@ AppletItem {
8585
required property string iconName
8686
required property string title
8787
required property string description
88+
property bool isCurrent: control.selectIndex === itemView.index
8889

8990
property D.Palette backgroundColor: D.Palette {
90-
normal: Qt.rgba(1, 1, 1, 0.4)
91-
normalDark: Qt.rgba(0, 0, 0, 0.4)
91+
normal: Qt.rgba(1, 1, 1, 0.3)
92+
normalDark: Qt.rgba(0, 0, 0, 0.3)
9293
}
9394
property D.Palette checkedBackgroundColor: D.Palette {
9495
normal: Qt.rgba(1, 1, 1, 0.6)
9596
normalDark: Qt.rgba(0, 0, 0, 0.6)
9697
}
9798
property D.Palette dropShadowColor: D.Palette {
9899
normal: Qt.rgba(0, 0, 0, 0.1)
99-
normalDark: Qt.rgba(1, 1, 1, 0.1)
100+
normalDark: Qt.rgba(0, 0, 0, 0.7)
100101
}
101-
property D.Palette innerShadowColor: D.Palette {
102+
property D.Palette innerShadowColor: D.Palette {
102103
normal: Qt.rgba(1, 1, 1, 0.2)
103-
normalDark: Qt.rgba(0, 0, 0, 0.2)
104+
normalDark: Qt.rgba(1, 1, 1, 0.03)
104105
}
105106

106107
contentItem: RowLayout {
@@ -155,7 +156,7 @@ AppletItem {
155156
width: 16
156157
height: 16
157158
}
158-
visible: control.checkedIndex === itemView.index
159+
visible: itemView.isCurrent
159160
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
160161
Layout.rightMargin: 10
161162
name: "item_checked"
@@ -169,10 +170,11 @@ AppletItem {
169170
id: backgroundRect
170171
anchors.fill: parent
171172
radius: 6
172-
color: control.selectIndex === itemView.index ? itemView.D.ColorSelector.checkedBackgroundColor
173+
color: itemView.isCurrent ? itemView.D.ColorSelector.checkedBackgroundColor
173174
: itemView.D.ColorSelector.backgroundColor
174175
}
175176
D.BoxShadow {
177+
visible: !itemView.isCurrent
176178
anchors.fill: parent
177179
shadowOffsetX: 0
178180
shadowOffsetY: 1
@@ -183,6 +185,7 @@ AppletItem {
183185
hollow: true
184186
}
185187
D.BoxInsetShadow {
188+
visible: !itemView.isCurrent
186189
anchors.fill: parent
187190
shadowOffsetX: 0
188191
shadowOffsetY: 1

0 commit comments

Comments
 (0)