on xenial help sign in
Use Ubuntu-brand gradients for the buttons in snap-decision notifications
commit0d255ad354408b76b9296f8cbb683d46631e7d97 authorMirco Müller <mirco.mueller@ubuntu.com> dateThu 18 Jul 2013, 10:50 (13 years ago) parent364d6ea
2 files changed+4−4
Notifications/Notification.qml+3−3 tests/qmltests/Notifications/tst_Notifications.qml+1−1
Notifications/Notification.qml+3−3
@@ -165,7 +165,7 @@ UbuntuShape {
165165 bottom: parent.bottom
166166 }
167167 text: notification.type == Notification.SnapDecision && actionRepeater.count >= 2 ? actionRepeater.itemAt(1).actionLabel : ""
168− color: "#cdcdcb"
168+ gradient: UbuntuColors.greyGradient
169169 onClicked: {
170170 if (actionRepeater.count > 2) {
171171 buttonRow.expanded = !buttonRow.expanded
@@ -195,7 +195,7 @@ UbuntuShape {
195195 top: parent.top
196196 bottom: parent.bottom
197197 }
198− color: notification.hints == Notification.ButtonTint ? "#d85317" : "#cdcdcb"
198+ gradient: notification.hints == Notification.ButtonTint ? UbuntuColors.orangeGradient : UbuntuColors.greyGradient
199199 visible: width > 0
200200 onClicked: notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
201201 }
@@ -242,7 +242,7 @@ UbuntuShape {
242242
243243 text: loader.actionLabel
244244 height: units.gu(4)
245− color: "#cdcdcb"
245+ gradient: UbuntuColors.greyGradient
246246 onClicked: notification.notification.invokeAction(loader.actionId)
247247 }
248248 }
tests/qmltests/Notifications/tst_Notifications.qml+1−1
@@ -365,7 +365,7 @@ Row {
365365 }
366366
367367 // 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")
369369
370370 // click the positive/right button
371371 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2)