on xenial help sign in
Make fg/bg-color-scheme selection more generic and adapt better to the background.
commit2643121613e1e5c7c4e06c6595c22899d30bcc14 authorMirco Müller <mirco.mueller@canonical.com> dateFri 19 Sep 2014, 19:36 (12 years ago) parent5dcfc03
1 file changed+4−3
qml/Notifications/Notification.qml+4−3
qml/Notifications/Notification.qml+4−3
@@ -40,6 +40,7 @@ Item {
4040 property bool fullscreen: false
4141 property int maxHeight
4242 property int margins
43+ property bool darkOnBright: panel.indicators.shown || type === Notification.SnapDecision
4344 readonly property color red: "#fc4949"
4445 readonly property color green: "#3fb24f"
4546 readonly property color sdLightGrey: "#eaeaea"
@@ -50,7 +51,7 @@ Item {
5051 objectName: "background"
5152 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : outterColumn.height + contentSpacing * 2) : 0
5253
53− color: (type == Notification.Confirmation && notificationList.useModal && !greeter.shown) || (type == Notification.SnapDecision) ? sdLightGrey : Qt.rgba(0.132, 0.117, 0.109, 0.97)
54+ color: (type == Notification.Confirmation && notificationList.useModal && !greeter.shown) || darkOnBright ? sdLightGrey : Qt.rgba(0.132, 0.117, 0.109, 0.97)
5455 opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
5556
5657 state: {
@@ -247,7 +248,7 @@ Item {
247248 }
248249 visible: type != Notification.Confirmation
249250 fontSize: "medium"
250− color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
251+ color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
251252 elide: Text.ElideRight
252253 textFormat: Text.PlainText
253254 }
@@ -262,7 +263,7 @@ Item {
262263 }
263264 visible: body != ""
264265 fontSize: "small"
265− color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
266+ color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
266267 wrapMode: Text.WordWrap
267268 maximumLineCount: 2
268269 elide: Text.ElideRight