on xenial help sign in
Use Ubuntu-brand gradients for the buttons in snap-decision notifications
0d255adMirco Müller
Notifications/Notification.qml+3−3
@@ -165,7 +165,7 @@ UbuntuShape {
165 bottom: parent.bottom
165 bottom: parent.bottom
166 }
166 }
167 text: notification.type == Notification.SnapDecision && actionRepeater.count >= 2 ? actionRepeater.itemAt(1).actionLabel : ""
167 text: notification.type == Notification.SnapDecision && actionRepeater.count >= 2 ? actionRepeater.itemAt(1).actionLabel : ""
168− color: "#cdcdcb"
168+ gradient: UbuntuColors.greyGradient
169 onClicked: {
169 onClicked: {
170 if (actionRepeater.count > 2) {
170 if (actionRepeater.count > 2) {
171 buttonRow.expanded = !buttonRow.expanded
171 buttonRow.expanded = !buttonRow.expanded
@@ -195,7 +195,7 @@ UbuntuShape {
195 top: parent.top
195 top: parent.top
196 bottom: parent.bottom
196 bottom: parent.bottom
197 }
197 }
198− color: notification.hints == Notification.ButtonTint ? "#d85317" : "#cdcdcb"
198+ gradient: notification.hints == Notification.ButtonTint ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient
199 visible: width > 0
199 visible: width > 0
200 onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
200 onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
201 }
201 }
@@ -242,7 +242,7 @@ UbuntuShape {
242
242
243 text: loader.actionLabel
243 text: loader.actionLabel
244 height: units.gu(4)
244 height: units.gu(4)
245− color: "#cdcdcb"
245+ gradient: UbuntuColors.greyGradient
246 onClicked: notification.notification.invokeAction(loader.actionId)
246 onClicked: notification.notification.invokeAction(loader.actionId)
247 }
247 }
248 }
248 }
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -365,7 +365,7 @@ Row {
365 }
365 }
366
366
367 // check the tinting of the positive/right button
367 // check the tinting of the positive/right button
368− compare(buttonAccept.color, data.buttonTinted ? "#d85317" : "#cdcdcb", "button has the wrong color-tint")
368+ compare(buttonAccept.gradient, data.buttonTinted ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient, "button has the wrong color-tint")
369
369
370 // click the positive/right button
370 // click the positive/right button
371 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)
371 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)