mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 20:56:51 +00:00
feat(GODT-2540): pop-up notification error icon is loaded on startup.
This commit is contained in:
@ -159,8 +159,9 @@ QString qmlResourcePathToQt(QString const &path) {
|
||||
//****************************************************************************************************************************************************
|
||||
TrayIcon::TrayIcon()
|
||||
: QSystemTrayIcon()
|
||||
, menu_(new QMenu) {
|
||||
|
||||
, menu_(new QMenu)
|
||||
, notificationErrorIcon_(loadIconFromSVG(":/qml/icons/ic-alert.svg"))
|
||||
{
|
||||
this->generateDotIcons();
|
||||
this->setContextMenu(menu_.get());
|
||||
|
||||
@ -304,8 +305,7 @@ void TrayIcon::setState(TrayIcon::State state, QString const &stateString, QStri
|
||||
/// \param[in] message The message.
|
||||
//****************************************************************************************************************************************************
|
||||
void TrayIcon::showErrorPopupNotification(QString const &title, QString const &message) {
|
||||
// this->showMessage(title, message, loadIconFromSVG(":/qml/icons/ic-exclamation-circle-filled.svg", errorColor));
|
||||
this->showMessage(title, message, loadIconFromSVG(":/qml/icons/ic-alert.svg"));
|
||||
this->showMessage(title, message, notificationErrorIcon_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -67,6 +67,7 @@ private: // data members
|
||||
QIcon greenDot_; ///< The green dot icon.
|
||||
QIcon greyDot_; ///< The grey dot icon.
|
||||
QIcon orangeDot_; ///< The orange dot icon.
|
||||
QIcon const notificationErrorIcon_; ///< The error icon used for notifications.
|
||||
|
||||
QTimer iconRefreshTimer_; ///< The timer used to periodically refresh the icon when DPI changes.
|
||||
QDateTime iconRefreshDeadline_; ///< The deadline for refreshing the icon
|
||||
|
||||
Reference in New Issue
Block a user