on xenial help sign in
Make fg/bg-color-scheme selection more generic and adapt better to the background.
2643121Mirco Müller
qml/Notifications/Notification.qml+4−3
@@ -40,6 +40,7 @@ Item {
40 property bool fullscreen: false
40 property bool fullscreen: false
41 property int maxHeight
41 property int maxHeight
42 property int margins
42 property int margins
43+ property bool darkOnBright: panel.indicators.shown || type === Notification.SnapDecision
43 readonly property color red: "#fc4949"
44 readonly property color red: "#fc4949"
44 readonly property color green: "#3fb24f"
45 readonly property color green: "#3fb24f"
45 readonly property color sdLightGrey: "#eaeaea"
46 readonly property color sdLightGrey: "#eaeaea"
@@ -50,7 +51,7 @@ Item {
50 objectName: "background"
51 objectName: "background"
51 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : outterColumn.height + contentSpacing * 2) : 0
52 implicitHeight: type !== Notification.PlaceHolder ? (fullscreen ? maxHeight : outterColumn.height + contentSpacing * 2) : 0
52
53
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)
54 opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
55 opacity: 1 // FIXME: 1 because of LP: #1354406 workaround, has to be 0 really
55
56
56 state: {
57 state: {
@@ -247,7 +248,7 @@ Item {
247 }
248 }
248 visible: type != Notification.Confirmation
249 visible: type != Notification.Confirmation
249 fontSize: "medium"
250 fontSize: "medium"
250− color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
251+ color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
251 elide: Text.ElideRight
252 elide: Text.ElideRight
252 textFormat: Text.PlainText
253 textFormat: Text.PlainText
253 }
254 }
@@ -262,7 +263,7 @@ Item {
262 }
263 }
263 visible: body != ""
264 visible: body != ""
264 fontSize: "small"
265 fontSize: "small"
265− color: type == Notification.SnapDecision ? sdFontColor : Theme.palette.selected.backgroundText
266+ color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
266 wrapMode: Text.WordWrap
267 wrapMode: Text.WordWrap
267 maximumLineCount: 2
268 maximumLineCount: 2
268 elide: Text.ElideRight
269 elide: Text.ElideRight