on xenial help sign in
Updated the button colors for snap-decision notifications based on feedback from design.
commit26536c5a4b1dc70fbb40087a00548e368d90081f authorMirco Müller <mirco.mueller@canonical.com> dateThu 24 Jul 2014, 15:08 (12 years ago) parent23bf7a1
1 file changed+10−11
qml/Notifications/Notification.qml+10−11
qml/Notifications/Notification.qml+10−11
@@ -41,11 +41,13 @@ Item {
4141 property int margins
4242 readonly property color red: "#fc4949"
4343 readonly property color green: "#3fb24f"
44+ readonly property color sdLightGrey: "#eaeaea"
45+ readonly property color sdDarkGrey: "#dddddd"
4446
4547 objectName: "background"
4648 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : contentColumn.height + contentColumn.spacing * 2) : 0
4749
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)
4951 opacity: 0
5052
5153 state: {
@@ -202,7 +204,7 @@ Item {
202204 margins: fullscreen ? 0 : spacing
203205 }
204206
205− spacing: units.gu(1)
207+ spacing: units.gu(2)
206208
207209 Row {
208210 id: topRow
@@ -261,11 +263,6 @@ Item {
261263 }
262264 }
263265
264− /*Rectangle {
265− width: units.gu(3)
266− height: units.gu(3)
267− color: "#ff0000"
268− }*/
269266 Image {
270267 id: secondaryIcon
271268
@@ -327,7 +324,7 @@ Item {
327324 right: parent.right
328325 }
329326 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 0
330− spacing: units.gu(1)
327+ spacing: units.gu(2)
331328 layoutDirection: Qt.RightToLeft
332329
333330 Repeater {
@@ -348,12 +345,14 @@ Item {
348345 width: buttonRow.width / 2 - spacing
349346 text: loader.actionLabel
350347 color: {
348+ var result = sdDarkGrey;
351349 if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
352− return green;
350+ result = green;
353351 }
354352 if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
355− return red;
353+ result = red;
356354 }
355+ return result;
357356 }
358357 onClicked: notification.notification.invokeAction(loader.actionId)
359358 }
@@ -369,7 +368,7 @@ Item {
369368 objectName: "button2"
370369 width: parent.width
371370 visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
372− color: "#dddddd"
371+ color: sdDarkGrey
373372 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
374373 expanded: false
375374 expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)