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.
23bf7a1Mirco Müller
qml/Notifications/Notification.qml+38−28
@@ -39,19 +39,13 @@ Item {
39 property bool fullscreen: false
39 property bool fullscreen: false
40 property int maxHeight
40 property int maxHeight
41 property int margins
41 property int margins
42− property Gradient greenGradient : Gradient {
42+ readonly property color red: "#fc4949"
43− GradientStop { position: 0.0; color: "#3fb24f" }
43+ readonly property color green: "#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− }
50
44
51 objectName: "background"
45 objectName: "background"
52 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
46 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
53
47
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)
55 opacity: 0
49 opacity: 0
56
50
57 state: {
51 state: {
@@ -227,21 +221,11 @@ Item {
227 height: units.gu(6)
221 height: units.gu(6)
228 shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
222 shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
229 visible: iconSource !== undefined && iconSource != ""
223 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+ }
241
225
242 Column {
226 Column {
243 id: labelColumn
227 id: labelColumn
244− width: parent.width - x
228+ width: secondaryIcon.visible ? parent.width - x - units.gu(4.5) : parent.width - x
245
229
246 anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
230 anchors.verticalCenter: (icon.visible && !bodyLabel.visible) ? icon.verticalCenter : undefined
247
231
@@ -255,7 +239,7 @@ Item {
255 }
239 }
256 fontSize: "medium"
240 fontSize: "medium"
257 font.bold: true
241 font.bold: true
258− color: Theme.palette.selected.backgroundText
242+ color: type == Notification.SnapDecision ? "#5d5d5d" :Theme.palette.selected.backgroundText
259 elide: Text.ElideRight
243 elide: Text.ElideRight
260 }
244 }
261
245
@@ -269,13 +253,32 @@ Item {
269 }
253 }
270 visible: body != ""
254 visible: body != ""
271 fontSize: "small"
255 fontSize: "small"
272− color: Theme.palette.selected.backgroundText
256+ color: type == Notification.SnapDecision ? "#5d5d5d" : Theme.palette.selected.backgroundText
273− opacity: 0.6
257+ opacity: type == Notification.SnapDecision ? 1.0 : 0.6
274 wrapMode: Text.WordWrap
258 wrapMode: Text.WordWrap
275 maximumLineCount: 10
259 maximumLineCount: 10
276 elide: Text.ElideRight
260 elide: Text.ElideRight
277 }
261 }
278 }
262 }
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
279 }
282 }
280
283
281 Column {
284 Column {
@@ -344,7 +347,14 @@ Item {
344 objectName: "button" + index
347 objectName: "button" + index
345 width: buttonRow.width / 2 - spacing
348 width: buttonRow.width / 2 - spacing
346 text: loader.actionLabel
349 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+ }
348 onClicked: notification.notification.invokeAction(loader.actionId)
358 onClicked: notification.notification.invokeAction(loader.actionId)
349 }
359 }
350 }
360 }
@@ -359,7 +369,7 @@ Item {
359 objectName: "button2"
369 objectName: "button2"
360 width: parent.width
370 width: parent.width
361 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
371 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
362− gradient: darkgreyGradient
372+ color: "#dddddd"
363 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
373 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
364 expanded: false
374 expanded: false
365 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
375 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
@@ -415,7 +425,7 @@ Item {
415 }
425 }
416 width: units.gu(2)
426 width: units.gu(2)
417 height: units.gu(2)
427 height: units.gu(2)
418− color: "white"
428+ color: "#5d5d5d"
419 name: splitLabel[2]
429 name: splitLabel[2]
420 }
430 }
421
431
@@ -428,7 +438,7 @@ Item {
428 verticalCenter: comboIcon.verticalCenter
438 verticalCenter: comboIcon.verticalCenter
429 }
439 }
430 fontSize: "small"
440 fontSize: "small"
431− color: "white"
441+ color: "#5d5d5d"
432 text: splitLabel[3]
442 text: splitLabel[3]
433 }
443 }
434 }
444 }
qml/Shell.qml+1−1
@@ -769,7 +769,7 @@ FocusScope {
769 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
769 visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
770 color: "#000000"
770 color: "#000000"
771 anchors.fill: parent
771 anchors.fill: parent
772− opacity: 0.5
772+ opacity: 0.9
773
773
774 MouseArea {
774 MouseArea {
775 anchors.fill: parent
775 anchors.fill: parent