on xenial help sign in
Updated the button colors for snap-decision notifications based on feedback from design.
26536c5Mirco Müller
qml/Notifications/Notification.qml+10−11
@@ -41,11 +41,13 @@ Item {
41 property int margins
41 property int margins
42 readonly property color red: "#fc4949"
42 readonly property color red: "#fc4949"
43 readonly property color green: "#3fb24f"
43 readonly property color green: "#3fb24f"
44+ readonly property color sdLightGrey: "#eaeaea"
45+ readonly property color sdDarkGrey: "#dddddd"
44
46
45 objectName: "background"
47 objectName: "background"
46 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
48 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
47
49
48− color: type == Notification.SnapDecision ? "#eaeaea" : Qt.rgba(0.132, 0.117, 0.109, 0.97)
50+ color: type == Notification.SnapDecision ? sdLightGrey : Qt.rgba(0.132, 0.117, 0.109, 0.97)
49 opacity: 0
51 opacity: 0
50
52
51 state: {
53 state: {
@@ -202,7 +204,7 @@ Item {
202 margins: fullscreen ? 0 : spacing
204 margins: fullscreen ? 0 : spacing
203 }
205 }
204
206
205− spacing: units.gu(1)
207+ spacing: units.gu(2)
206
208
207 Row {
209 Row {
208 id: topRow
210 id: topRow
@@ -261,11 +263,6 @@ Item {
261 }
263 }
262 }
264 }
263
265
264− /*Rectangle {
265− width: units.gu(3)
266− height: units.gu(3)
267− color: "#ff0000"
268− }*/
269 Image {
266 Image {
270 id: secondaryIcon
267 id: secondaryIcon
271
268
@@ -327,7 +324,7 @@ Item {
327 right: parent.right
324 right: parent.right
328 }
325 }
329 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
326 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
330− spacing: units.gu(1)
327+ spacing: units.gu(2)
331 layoutDirection: Qt.RightToLeft
328 layoutDirection: Qt.RightToLeft
332
329
333 Repeater {
330 Repeater {
@@ -348,12 +345,14 @@ Item {
348 width: buttonRow.width / 2 - spacing
345 width: buttonRow.width / 2 - spacing
349 text: loader.actionLabel
346 text: loader.actionLabel
350 color: {
347 color: {
348+ var result = sdDarkGrey;
351 if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
349 if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
352− return green;
350+ result = green;
353 }
351 }
354 if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
352 if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
355− return red;
353+ result = red;
356 }
354 }
355+ return result;
357 }
356 }
358 onClicked: notification.notification.invokeAction(loader.actionId)
357 onClicked: notification.notification.invokeAction(loader.actionId)
359 }
358 }
@@ -369,7 +368,7 @@ Item {
369 objectName: "button2"
368 objectName: "button2"
370 width: parent.width
369 width: parent.width
371 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
370 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
372− color: "#dddddd"
371+ color: sdDarkGrey
373 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
372 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
374 expanded: false
373 expanded: false
375 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
374 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)