diff --git a/internal/frontend/qml/Bridge.qml b/internal/frontend/qml/Bridge.qml
index 4ea8c1a2..ce6dbc18 100644
--- a/internal/frontend/qml/Bridge.qml
+++ b/internal/frontend/qml/Bridge.qml
@@ -155,9 +155,9 @@ QtObject {
property SystemTrayIcon _trayIcon: SystemTrayIcon {
id: trayIcon
visible: true
- icon.source: "./icons/systray-mono.png"
+ icon.source: getTrayIconPath()
icon.mask: true // make sure that systems like macOS will use proper color
- tooltip: `Proton Mail Bridge v${backend.version}`
+ tooltip: `${root.title} v${backend.version}`
onActivated: {
function calcStatusWindowPosition() {
// On some platforms (X11 / Plasma) Qt does not provide icon position and geometry info.
@@ -223,6 +223,31 @@ QtObject {
break;
}
}
+
+ property NotificationFilter _systrayfilter: NotificationFilter {
+ source: root._notifications ? root._notifications.all : undefined
+ }
+
+ function getTrayIconPath() {
+ var color = backend.goos == "darwin" ? "mono" : "color"
+
+ var level = "norm"
+ if (_systrayfilter.topmost) {
+ switch (_systrayfilter.topmost.type) {
+ case Notification.NotificationType.Danger:
+ level = "error"
+ break;
+ case Notification.NotificationType.Warning:
+ level = "warn"
+ break;
+ case Notification.NotificationType.Info:
+ level = "update"
+ break;
+ }
+ }
+
+ return `./icons/systray-${color}-${level}.png`
+ }
}
Component.onCompleted: {
diff --git a/internal/frontend/qml/Bridge_test.qml b/internal/frontend/qml/Bridge_test.qml
index 1b6598ab..d741139a 100644
--- a/internal/frontend/qml/Bridge_test.qml
+++ b/internal/frontend/qml/Bridge_test.qml
@@ -649,6 +649,12 @@ Window {
ScrollView {
id: settingsTab
ColumnLayout {
+ RowLayout {
+ Label {colorScheme : root.colorScheme ; text : "GOOS : "}
+ Button {colorScheme : root.colorScheme ; text : "Linux" ; onClicked : root.goos = "linux" ; enabled: root.goos != "linux"}
+ Button {colorScheme : root.colorScheme ; text : "Windows" ; onClicked : root.goos = "windows" ; enabled: root.goos != "windows"}
+ Button {colorScheme : root.colorScheme ; text : "macOS" ; onClicked : root.goos = "darwin" ; enabled: root.goos != "darwin"}
+ }
RowLayout {
Label {colorScheme: root.colorScheme; text: "Automatic updates:"}
Toggle {colorScheme: root.colorScheme; checked: root.isAutomaticUpdateOn; onClicked: root.isAutomaticUpdateOn = !root.isAutomaticUpdateOn}
diff --git a/internal/frontend/qml/icons/ic-systray.svg b/internal/frontend/qml/icons/ic-systray.svg
deleted file mode 100644
index eca43ff8..00000000
--- a/internal/frontend/qml/icons/ic-systray.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
diff --git a/internal/frontend/qml/icons/systray-color-error.png b/internal/frontend/qml/icons/systray-color-error.png
new file mode 100644
index 00000000..acc8781f
Binary files /dev/null and b/internal/frontend/qml/icons/systray-color-error.png differ
diff --git a/internal/frontend/qml/icons/systray-color-norm.png b/internal/frontend/qml/icons/systray-color-norm.png
new file mode 100644
index 00000000..9f9ab0a8
Binary files /dev/null and b/internal/frontend/qml/icons/systray-color-norm.png differ
diff --git a/internal/frontend/qml/icons/systray-color-update.png b/internal/frontend/qml/icons/systray-color-update.png
new file mode 100644
index 00000000..a2714031
Binary files /dev/null and b/internal/frontend/qml/icons/systray-color-update.png differ
diff --git a/internal/frontend/qml/icons/systray-color-warn.png b/internal/frontend/qml/icons/systray-color-warn.png
new file mode 100644
index 00000000..d6333659
Binary files /dev/null and b/internal/frontend/qml/icons/systray-color-warn.png differ
diff --git a/internal/frontend/qml/icons/systray-mono-error.png b/internal/frontend/qml/icons/systray-mono-error.png
new file mode 100644
index 00000000..a1e92933
Binary files /dev/null and b/internal/frontend/qml/icons/systray-mono-error.png differ
diff --git a/internal/frontend/qml/icons/systray-mono-norm.png b/internal/frontend/qml/icons/systray-mono-norm.png
new file mode 100644
index 00000000..bc16126c
Binary files /dev/null and b/internal/frontend/qml/icons/systray-mono-norm.png differ
diff --git a/internal/frontend/qml/icons/systray-mono-update.png b/internal/frontend/qml/icons/systray-mono-update.png
new file mode 100644
index 00000000..209bb6bf
Binary files /dev/null and b/internal/frontend/qml/icons/systray-mono-update.png differ
diff --git a/internal/frontend/qml/icons/systray-mono-warn.png b/internal/frontend/qml/icons/systray-mono-warn.png
new file mode 100644
index 00000000..a53cfaf6
Binary files /dev/null and b/internal/frontend/qml/icons/systray-mono-warn.png differ
diff --git a/internal/frontend/qml/icons/systray-mono.png b/internal/frontend/qml/icons/systray-mono.png
deleted file mode 100644
index 7d152a4f..00000000
Binary files a/internal/frontend/qml/icons/systray-mono.png and /dev/null differ
diff --git a/internal/frontend/qml/icons/systray.svg b/internal/frontend/qml/icons/systray.svg
new file mode 100644
index 00000000..8253c910
--- /dev/null
+++ b/internal/frontend/qml/icons/systray.svg
@@ -0,0 +1,565 @@
+
+
+
+