on xenial help sign in
fix notifications colors with the new UITK themes
a32e7e1Lukáš Tinkl
qml/Notifications/Notification.qml+8−13
@@ -42,11 +42,9 @@ StyledItem {
42 property int margins
42 property int margins
43 readonly property bool draggable: (type === Notification.SnapDecision && state === "contracted") || type === Notification.Interactive || type === Notification.Ephemeral
43 readonly property bool draggable: (type === Notification.SnapDecision && state === "contracted") || type === Notification.Interactive || type === Notification.Ephemeral
44 readonly property bool darkOnBright: panel.indicators.shown || type === Notification.SnapDecision
44 readonly property bool darkOnBright: panel.indicators.shown || type === Notification.SnapDecision
45− readonly property color red: "#fc4949"
45+ readonly property color red: UbuntuColors.red
46− readonly property color green: "#3fb24f"
46+ readonly property color green: UbuntuColors.green
47 readonly property color sdLightGrey: "#eaeaea"
47 readonly property color sdLightGrey: "#eaeaea"
48− readonly property color sdDarkGrey: "#dddddd"
49− readonly property color sdFontColor: "#5d5d5d"
50 readonly property real contentSpacing: units.gu(2)
48 readonly property real contentSpacing: units.gu(2)
51 readonly property bool canBeClosed: type === Notification.Ephemeral
49 readonly property bool canBeClosed: type === Notification.Ephemeral
52 property bool hasMouse
50 property bool hasMouse
@@ -59,7 +57,7 @@ StyledItem {
59 opacity: 1 - (x / notification.width) // FIXME: non-zero initially because of LP: #1354406 workaround, we want this to start at 0 upon creation eventually
57 opacity: 1 - (x / notification.width) // FIXME: non-zero initially because of LP: #1354406 workaround, we want this to start at 0 upon creation eventually
60
58
61 theme: ThemeSettings {
59 theme: ThemeSettings {
62− name: "Ubuntu.Components.Themes.Ambiance"
60+ name: darkOnBright ? "Ubuntu.Components.Themes.Ambiance" : "Ubuntu.Components.Themes.SuruDark"
63 }
61 }
64
62
65 state: {
63 state: {
@@ -285,7 +283,6 @@ StyledItem {
285 }
283 }
286 visible: type !== Notification.Confirmation
284 visible: type !== Notification.Confirmation
287 fontSize: "medium"
285 fontSize: "medium"
288− color: darkOnBright ? sdFontColor : theme.palette.normal.backgroundText
289 elide: Text.ElideRight
286 elide: Text.ElideRight
290 textFormat: Text.PlainText
287 textFormat: Text.PlainText
291 }
288 }
@@ -300,7 +297,6 @@ StyledItem {
300 }
297 }
301 visible: body != "" && type !== Notification.Confirmation
298 visible: body != "" && type !== Notification.Confirmation
302 fontSize: "small"
299 fontSize: "small"
303− color: darkOnBright ? sdFontColor : theme.palette.normal.backgroundText
304 wrapMode: Text.Wrap
300 wrapMode: Text.Wrap
305 maximumLineCount: type == Notification.SnapDecision ? 12 : 2
301 maximumLineCount: type == Notification.SnapDecision ? 12 : 2
306 elide: Text.ElideRight
302 elide: Text.ElideRight
@@ -341,7 +337,6 @@ StyledItem {
341 anchors.horizontalCenter: parent.horizontalCenter
337 anchors.horizontalCenter: parent.horizontalCenter
342 visible: type === Notification.Confirmation && body !== ""
338 visible: type === Notification.Confirmation && body !== ""
343 fontSize: "medium"
339 fontSize: "medium"
344− color: darkOnBright ? sdFontColor : theme.palette.normal.backgroundText
345 wrapMode: Text.WordWrap
340 wrapMode: Text.WordWrap
346 maximumLineCount: 1
341 maximumLineCount: 1
347 elide: Text.ElideRight
342 elide: Text.ElideRight
@@ -361,7 +356,7 @@ StyledItem {
361 }
356 }
362
357
363 height: units.gu(1)
358 height: units.gu(1)
364− backgroundColor: darkOnBright ? UbuntuColors.darkGrey : UbuntuColors.lightGrey
359+ backgroundColor: theme.palette.normal.background
365 aspect: UbuntuShape.Flat
360 aspect: UbuntuShape.Flat
366 radius: "small"
361 radius: "small"
367
362
@@ -370,7 +365,7 @@ StyledItem {
370 objectName: "innerBar"
365 objectName: "innerBar"
371 width: valueIndicator.width * valueIndicator.value / 100
366 width: valueIndicator.width * valueIndicator.value / 100
372 height: units.gu(1)
367 height: units.gu(1)
373− backgroundColor: notification.hints["x-canonical-value-bar-tint"] === "true" ? UbuntuColors.orange : darkOnBright ? UbuntuColors.lightGrey : "white"
368+ backgroundColor: notification.hints["x-canonical-value-bar-tint"] === "true" ? theme.palette.normal.activity : theme.palette.highlighted.foreground
374 aspect: UbuntuShape.Flat
369 aspect: UbuntuShape.Flat
375 radius: "small"
370 radius: "small"
376 }
371 }
@@ -447,7 +442,7 @@ StyledItem {
447 objectName: "notify_oot_button" + index
442 objectName: "notify_oot_button" + index
448 width: oneOverTwoCase.width
443 width: oneOverTwoCase.width
449 text: oneOverTwoLoaderTop.actionLabel
444 text: oneOverTwoLoaderTop.actionLabel
450− color: notification.hints["x-canonical-private-affirmative-tint"] == "true" ? green : sdDarkGrey
445+ color: notification.hints["x-canonical-private-affirmative-tint"] == "true" ? green : theme.palette.normal.baseText
451 onClicked: notification.notification.invokeAction(oneOverTwoLoaderTop.actionId)
446 onClicked: notification.notification.invokeAction(oneOverTwoLoaderTop.actionId)
452 }
447 }
453 }
448 }
@@ -475,7 +470,7 @@ StyledItem {
475 objectName: "notify_oot_button" + index
470 objectName: "notify_oot_button" + index
476 width: oneOverTwoCase.width / 2 - spacing * 2
471 width: oneOverTwoCase.width / 2 - spacing * 2
477 text: oneOverTwoLoaderBottom.actionLabel
472 text: oneOverTwoLoaderBottom.actionLabel
478− color: index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true" ? red : sdDarkGrey
473+ color: index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true" ? red : theme.palette.normal.baseText
479 onClicked: notification.notification.invokeAction(oneOverTwoLoaderBottom.actionId)
474 onClicked: notification.notification.invokeAction(oneOverTwoLoaderBottom.actionId)
480 }
475 }
481 }
476 }
@@ -536,7 +531,7 @@ StyledItem {
536 width: buttonRow.width / 2 - spacing * 2
531 width: buttonRow.width / 2 - spacing * 2
537 text: loader.actionLabel
532 text: loader.actionLabel
538 color: {
533 color: {
539− var result = sdDarkGrey;
534+ var result = theme.palette.normal.baseText;
540 if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
535 if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
541 result = green;
536 result = green;
542 }
537 }
qml/Notifications/OptionToggle.qml+1−1
@@ -96,7 +96,7 @@ UbuntuShape {
96
96
97 width: parent.width
97 width: parent.width
98 text: splitLabel[3]
98 text: splitLabel[3]
99− color:"#5d5d5d"
99+ color: theme.palette.normal.backgroundText
100 fontSize: "small"
100 fontSize: "small"
101 maximumLineCount: 1
101 maximumLineCount: 1
102 elide: Text.ElideRight
102 elide: Text.ElideRight