From b5bcbac542c6739ef5bcf29a4be889055dc18bd2 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Mon, 16 Jan 2023 13:21:31 +0300 Subject: [PATCH] UI: Tray: Change icon color on some states --- src/ui/driver/drivermanager.cpp | 8 ++--- src/ui/form/tray/traycontroller.cpp | 6 ++++ src/ui/form/tray/traycontroller.h | 2 ++ src/ui/form/tray/trayicon.cpp | 50 ++++++++++++++++++++-------- src/ui/form/tray/trayicon.h | 7 ++-- src/ui/fort_icons.qrc | 2 ++ src/ui/icons/sheild-96_gray.png | Bin 0 -> 7420 bytes src/ui/icons/sheild-96_red.png | Bin 0 -> 8042 bytes src/ui/manager/windowmanager.cpp | 6 ++-- 9 files changed, 58 insertions(+), 23 deletions(-) create mode 100644 src/ui/icons/sheild-96_gray.png create mode 100644 src/ui/icons/sheild-96_red.png diff --git a/src/ui/driver/drivermanager.cpp b/src/ui/driver/drivermanager.cpp index 025ff95a..db8a89a4 100644 --- a/src/ui/driver/drivermanager.cpp +++ b/src/ui/driver/drivermanager.cpp @@ -73,10 +73,10 @@ bool DriverManager::openDevice() { const bool res = device()->open(DriverCommon::deviceName()); - emit isDeviceOpenedChanged(); - updateErrorCode(res); + emit isDeviceOpenedChanged(); + return res; } @@ -84,10 +84,10 @@ bool DriverManager::closeDevice() { const bool res = device()->close(); - emit isDeviceOpenedChanged(); - updateErrorCode(true); + emit isDeviceOpenedChanged(); + return res; } diff --git a/src/ui/form/tray/traycontroller.cpp b/src/ui/form/tray/traycontroller.cpp index 5157f196..b06f66b7 100644 --- a/src/ui/form/tray/traycontroller.cpp +++ b/src/ui/form/tray/traycontroller.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -50,6 +51,11 @@ HotKeyManager *TrayController::hotKeyManager() const return IoC(); } +DriverManager *TrayController::driverManager() const +{ + return IoC(); +} + TranslationManager *TrayController::translationManager() const { return IoC(); diff --git a/src/ui/form/tray/traycontroller.h b/src/ui/form/tray/traycontroller.h index f4d7e61c..211e5804 100644 --- a/src/ui/form/tray/traycontroller.h +++ b/src/ui/form/tray/traycontroller.h @@ -4,6 +4,7 @@ #include class ConfManager; +class DriverManager; class FirewallConf; class FortManager; class FortSettings; @@ -27,6 +28,7 @@ public: IniOptions *ini() const; IniUser *iniUser() const; HotKeyManager *hotKeyManager() const; + DriverManager *driverManager() const; TranslationManager *translationManager() const; WindowManager *windowManager() const; diff --git a/src/ui/form/tray/trayicon.cpp b/src/ui/form/tray/trayicon.cpp index bd015538..39d09a56 100644 --- a/src/ui/form/tray/trayicon.cpp +++ b/src/ui/form/tray/trayicon.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include
#include #include @@ -145,6 +146,7 @@ QAction *addAction(QWidget *widget, const QIcon &icon, const QString &text, TrayIcon::TrayIcon(QObject *parent) : QSystemTrayIcon(parent), m_trayTriggered(false), + m_alerted(false), m_animatedAlert(false), m_ctrl(new TrayController(this)) { @@ -152,6 +154,11 @@ TrayIcon::TrayIcon(QObject *parent) : setupController(); connect(this, &QSystemTrayIcon::activated, this, &TrayIcon::onTrayActivated); + + connect(confManager(), &ConfManager::confChanged, this, &TrayIcon::updateTrayMenu); + connect(confManager(), &ConfManager::iniUserChanged, this, &TrayIcon::updateTrayMenu); + connect(driverManager(), &DriverManager::isDeviceOpenedChanged, this, + &TrayIcon::updateTrayIconShape); } FortSettings *TrayIcon::settings() const @@ -184,6 +191,11 @@ HotKeyManager *TrayIcon::hotKeyManager() const return ctrl()->hotKeyManager(); } +DriverManager *TrayIcon::driverManager() const +{ + return ctrl()->driverManager(); +} + WindowManager *TrayIcon::windowManager() const { return ctrl()->windowManager(); @@ -211,9 +223,12 @@ void TrayIcon::onTrayActivated(QSystemTrayIcon::ActivationReason reason) void TrayIcon::updateTrayIcon(bool alerted) { - updateAnimatedTrayIcon(alerted); + m_alerted = alerted; + m_animatedAlert = false; - updateAlertTimer(alerted); + updateAlertTimer(); + + updateTrayIconShape(); } void TrayIcon::showTrayMenu(const QPoint &pos) @@ -227,6 +242,7 @@ void TrayIcon::updateTrayMenu(bool onlyFlags) updateAppGroupActions(); } + updateTrayIconShape(); updateTrayMenuFlags(); updateHotKeys(); } @@ -286,8 +302,6 @@ void TrayIcon::setupUi() setupTrayMenu(); updateTrayMenu(); - updateTrayIcon(); - updateClickActions(); } @@ -441,7 +455,7 @@ void TrayIcon::updateAppGroupActions() } } -void TrayIcon::updateAlertTimer(bool alerted) +void TrayIcon::updateAlertTimer() { if (!iniUser()->trayAnimateAlert()) return; @@ -452,25 +466,35 @@ void TrayIcon::updateAlertTimer(bool alerted) connect(m_alertTimer, &QTimer::timeout, this, [&] { m_animatedAlert = !m_animatedAlert; - updateAnimatedTrayIcon(/*alerted=*/true, m_animatedAlert); + updateTrayIconShape(); }); } - m_animatedAlert = alerted; + m_animatedAlert = m_alerted; - if (alerted) { + if (m_alerted) { m_alertTimer->start(); } else { m_alertTimer->stop(); } } -void TrayIcon::updateAnimatedTrayIcon(bool alerted, bool animated) +void TrayIcon::updateTrayIconShape() { - const auto icon = alerted - ? (animated ? IconCache::icon(":/icons/error.png") - : GuiUtil::overlayIcon(":/icons/sheild-96.png", ":/icons/error.png")) - : IconCache::icon(":/icons/sheild-96.png"); + QString mainIconPath; + + if (!conf()->filterEnabled() || !driverManager()->isDeviceOpened()) { + mainIconPath = ":/icons/sheild-96_gray.png"; + } else if (conf()->stopTraffic() || conf()->stopInetTraffic()) { + mainIconPath = ":/icons/sheild-96_red.png"; + } else { + mainIconPath = ":/icons/sheild-96.png"; + } + + const auto icon = m_alerted + ? (m_animatedAlert ? IconCache::icon(":/icons/error.png") + : GuiUtil::overlayIcon(mainIconPath, ":/icons/error.png")) + : IconCache::icon(mainIconPath); this->setIcon(icon); } diff --git a/src/ui/form/tray/trayicon.h b/src/ui/form/tray/trayicon.h index db23af2f..e7c9de26 100644 --- a/src/ui/form/tray/trayicon.h +++ b/src/ui/form/tray/trayicon.h @@ -8,6 +8,7 @@ QT_FORWARD_DECLARE_CLASS(QActionGroup) QT_FORWARD_DECLARE_CLASS(QTimer) class ConfManager; +class DriverManager; class FirewallConf; class FortSettings; class HotKeyManager; @@ -52,6 +53,7 @@ public: IniOptions *ini() const; IniUser *iniUser() const; HotKeyManager *hotKeyManager() const; + DriverManager *driverManager() const; WindowManager *windowManager() const; ActionType clickEventActionType(ClickType clickType) const; @@ -87,8 +89,8 @@ private: void updateTrayMenuFlags(); void updateAppGroupActions(); - void updateAlertTimer(bool alerted); - void updateAnimatedTrayIcon(bool alerted, bool animated = false); + void updateAlertTimer(); + void updateTrayIconShape(); void addHotKey(QAction *action, const QString &shortcutText); void updateHotKeys(); @@ -108,6 +110,7 @@ private: private: bool m_trayTriggered : 1; + bool m_alerted : 1; bool m_animatedAlert : 1; TrayController *m_ctrl = nullptr; diff --git a/src/ui/fort_icons.qrc b/src/ui/fort_icons.qrc index 22249ae6..d96b65d4 100644 --- a/src/ui/fort_icons.qrc +++ b/src/ui/fort_icons.qrc @@ -38,6 +38,8 @@ icons/pencil.png icons/play.png icons/sheild-96.png + icons/sheild-96_gray.png + icons/sheild-96_red.png icons/save_as.png icons/server_components.png icons/time.png diff --git a/src/ui/icons/sheild-96_gray.png b/src/ui/icons/sheild-96_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..a915a1dec6672eabeac298ce1b63c7f904406e19 GIT binary patch literal 7420 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGma{vGma{-JZxd#9M9Fa*xK~#8N?OhA7 zT~&ErXYYO9=iZx}dlN#E3nU1LP+nrE>Zqh>r&FiWnHrq2)gaCQGD9uS)Q)W}#s?_1 zC@p0a87yjR4GNW^4?EB*MXVALgcu11a`U>$y*KxH-p~Huzt+F^+WVf|+;i@OFy>4C z^RL(5d#&$Z>tAa>uR4WOIE7OqYLTxBxQ z857nzPH7pF7N@j~DH}~^O~UzBT%^@%H7k|MbSjlP5R1iX=E%#Al`=r=hHL(KOEczv zo?3biH86`boi#sP*Hei^LM4+)l^}r@NhA}LXUBsw*oMPK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ager::confChanged, m_trayIcon, &TrayIcon::updateTrayMenu); - connect(confManager, &ConfManager::iniUserChanged, m_trayIcon, &TrayIcon::updateTrayMenu); connect(confManager, &ConfManager::appAlerted, m_trayIcon, - [&] { m_trayIcon->updateTrayIcon(true); }); + [&] { m_trayIcon->updateTrayIcon(/*alerted=*/true); }); } void WindowManager::setupProgramsWindow() @@ -145,7 +143,7 @@ void WindowManager::setupProgramsWindow() connect(m_progWindow, &ProgramsWindow::aboutToClose, this, &WindowManager::closeProgramsWindow); connect(m_progWindow, &ProgramsWindow::activationChanged, m_trayIcon, - [&] { m_trayIcon->updateTrayIcon(false); }); + [&] { m_trayIcon->updateTrayIcon(/*alerted=*/false); }); } void WindowManager::setupOptionsWindow()