mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 06:16:32 +00:00
d9d6d90dc9
- legacy Style and ThemePalette removed - moved and deduplicated font definitions into `Theme` (unrelated to a color palette) - `Style.current.foo` -> `Theme.foo` - `Style.current.fooColor` -> `Theme.palette.fooColor` - upgrade the imports to 5.15 - removed some mode dead components Fixes #16514
55 lines
1.1 KiB
QML
55 lines
1.1 KiB
QML
import Qt.labs.platform 1.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import utils 1.0
|
|
|
|
SystemTrayIcon {
|
|
id: root
|
|
|
|
property bool isProduction: true
|
|
property bool showRedDot: false
|
|
|
|
signal activateApp()
|
|
|
|
visible: true
|
|
|
|
|
|
icon.source: {
|
|
if (Qt.platform.os === Constants.windows) {
|
|
return root.showRedDot ? Theme.svg("status-logo-white-windows-with-red-dot") : Theme.svg("status-logo-white-windows")
|
|
}
|
|
return root.showRedDot ? Theme.svg("status-logo-white-with-red-dot") : Theme.svg("status-logo-white")
|
|
}
|
|
icon.mask: Qt.platform.os !== Constants.windows
|
|
|
|
onMessageClicked: {
|
|
if (Qt.platform.os === Constants.windows) {
|
|
root.activateApp()
|
|
}
|
|
}
|
|
|
|
menu: Menu {
|
|
MenuItem {
|
|
text: qsTr("Open Status")
|
|
onTriggered: {
|
|
root.activateApp()
|
|
}
|
|
}
|
|
|
|
MenuSeparator {
|
|
}
|
|
|
|
MenuItem {
|
|
text: qsTr("Quit")
|
|
onTriggered: Qt.quit()
|
|
}
|
|
}
|
|
|
|
onActivated: {
|
|
if (reason !== SystemTrayIcon.Context) {
|
|
root.activateApp()
|
|
}
|
|
}
|
|
}
|