forked from Silverfish/proton-bridge
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()
|
TrayIcon::TrayIcon()
|
||||||
: QSystemTrayIcon()
|
: QSystemTrayIcon()
|
||||||
, menu_(new QMenu) {
|
, menu_(new QMenu)
|
||||||
|
, notificationErrorIcon_(loadIconFromSVG(":/qml/icons/ic-alert.svg"))
|
||||||
|
{
|
||||||
this->generateDotIcons();
|
this->generateDotIcons();
|
||||||
this->setContextMenu(menu_.get());
|
this->setContextMenu(menu_.get());
|
||||||
|
|
||||||
@ -304,8 +305,7 @@ void TrayIcon::setState(TrayIcon::State state, QString const &stateString, QStri
|
|||||||
/// \param[in] message The message.
|
/// \param[in] message The message.
|
||||||
//****************************************************************************************************************************************************
|
//****************************************************************************************************************************************************
|
||||||
void TrayIcon::showErrorPopupNotification(QString const &title, QString const &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, notificationErrorIcon_);
|
||||||
this->showMessage(title, message, loadIconFromSVG(":/qml/icons/ic-alert.svg"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,7 @@ private: // data members
|
|||||||
QIcon greenDot_; ///< The green dot icon.
|
QIcon greenDot_; ///< The green dot icon.
|
||||||
QIcon greyDot_; ///< The grey dot icon.
|
QIcon greyDot_; ///< The grey dot icon.
|
||||||
QIcon orangeDot_; ///< The orange 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.
|
QTimer iconRefreshTimer_; ///< The timer used to periodically refresh the icon when DPI changes.
|
||||||
QDateTime iconRefreshDeadline_; ///< The deadline for refreshing the icon
|
QDateTime iconRefreshDeadline_; ///< The deadline for refreshing the icon
|
||||||
|
|||||||
Reference in New Issue
Block a user