on xenial help sign in
Changed layout of secondary icon, changed tint of modal background, changed snap-decision background, changed text-colors, use new button-tint-hints, added separator.
commit23bf7a18bcbe5ef08a8d407a057390ea5bb07c60 authorMirco Müller <mirco.mueller@canonical.com> dateThu 24 Jul 2014, 10:11 (12 years ago) parenta742b53
2 files changed+39−29
qml/Notifications/Notification.qml+38−28 qml/Shell.qml+1−1
qml/Notifications/Notification.qml+38−28
@@ -39,19 +39,13 @@ Item {
3939 property bool fullscreen: false
4040 property int maxHeight
4141 property int margins
42− property Gradient greenGradient : Gradient {
43− GradientStop { position: 0.0; color: "#3fb24f" }
44− GradientStop { position: 1.0; color: "#3fb24f" }
45− }
46− property Gradient darkgreyGradient: Gradient {
47− GradientStop { position: 0.0; color: "#4d4745" }
48− GradientStop { position: 1.0; color: "#4d4745" }
49− }
42+ readonly property color red: "#fc4949"
43+ readonly property color green: "#3fb24f"
5044
5145 objectName: "background"
5246 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
5347
54− color: Qt.rgba(0.132, 0.117, 0.109, 0.97)
48+ color: type == Notification.SnapDecision ? "#eaeaea" : Qt.rgba(0.132, 0.117, 0.109, 0.97)
5549 opacity: 0
5650
5751 state: {
@@ -227,21 +221,11 @@ Item {
227221 height: units.gu(6)
228222 shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
229223 visible: iconSource !== undefined && iconSource != ""
230− }
231−
232− Image {
233− id: secondaryIcon
234−
235− objectName: "secondaryIcon"
236− width: units.gu(2)
237− height: units.gu(2)
238− visible: source !== undefined && source != ""
239− fillMode: Image.PreserveAspectCrop
240− }
224+ }
241225
242226 Column {
243227 id: labelColumn
244− width: parent.width - x
228+ width: secondaryIcon.visible ? parent.width - x - units.gu(4.5) : parent.width - x
245229
246230 anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
247231
@@ -255,7 +239,7 @@ Item {
255239 }
256240 fontSize: "medium"
257241 font.bold: true
258− color: Theme.palette.selected.backgroundText
242+ color: type == Notification.SnapDecision ? "#5d5d5d" :Theme.palette.selected.backgroundText
259243 elide: Text.ElideRight
260244 }
261245
@@ -269,13 +253,32 @@ Item {
269253 }
270254 visible: body != ""
271255 fontSize: "small"
272− color: Theme.palette.selected.backgroundText
273− opacity: 0.6
256+ color: type == Notification.SnapDecision ? "#5d5d5d" : Theme.palette.selected.backgroundText
257+ opacity: type == Notification.SnapDecision ? 1.0 : 0.6
274258 wrapMode: Text.WordWrap
275259 maximumLineCount: 10
276260 elide: Text.ElideRight
277261 }
278262 }
263+
264+ /*Rectangle {
265+ width: units.gu(3)
266+ height: units.gu(3)
267+ color: "#ff0000"
268+ }*/
269+ Image {
270+ id: secondaryIcon
271+
272+ objectName: "secondaryIcon"
273+ width: units.gu(3)
274+ height: units.gu(3)
275+ visible: source !== undefined && source != ""
276+ fillMode: Image.PreserveAspectCrop
277+ }
278+ }
279+
280+ ListItem.ThinDivider {
281+ visible: type == Notification.SnapDecision
279282 }
280283
281284 Column {
@@ -344,7 +347,14 @@ Item {
344347 objectName: "button" + index
345348 width: buttonRow.width / 2 - spacing
346349 text: loader.actionLabel
347− gradient: notification.hints["x-canonical-private-button-tint"] == "true" && index == 0 ? greenGradient : darkgreyGradient
350+ color: {
351+ if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
352+ return green;
353+ }
354+ if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
355+ return red;
356+ }
357+ }
348358 onClicked: notification.notification.invokeAction(loader.actionId)
349359 }
350360 }
@@ -359,7 +369,7 @@ Item {
359369 objectName: "button2"
360370 width: parent.width
361371 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
362− gradient: darkgreyGradient
372+ color: "#dddddd"
363373 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
364374 expanded: false
365375 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
@@ -415,7 +425,7 @@ Item {
415425 }
416426 width: units.gu(2)
417427 height: units.gu(2)
418− color: "white"
428+ color: "#5d5d5d"
419429 name: splitLabel[2]
420430 }
421431
@@ -428,7 +438,7 @@ Item {
428438 verticalCenter: comboIcon.verticalCenter
429439 }
430440 fontSize: "small"
431− color: "white"
441+ color: "#5d5d5d"
432442 text: splitLabel[3]
433443 }
434444 }
qml/Shell.qml+1−1
@@ -769,7 +769,7 @@ FocusScope {
769769 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
770770 color: "#000000"
771771 anchors.fill: parent
772− opacity: 0.5
772+ opacity: 0.9
773773
774774 MouseArea {
775775 anchors.fill: parent