From 06c1f1ed3d1908ba62c7f8983bd9bcd88657011c Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 14 May 2023 20:23:07 +0300 Subject: [PATCH] UI: Update icons --- src/ui/FortFirewallUI.pro | 4 ++-- src/ui/form/home/homewindow.cpp | 2 +- src/ui/form/home/pages/homemainpage.cpp | 13 ++++++------ src/ui/form/home/pages/homemainpage.h | 2 +- .../pages/{updatespage.cpp => homepage.cpp} | 8 +++---- src/ui/form/home/pages/homepage.h | 20 ++++++++++++++++++ src/ui/form/home/pages/updatespage.h | 20 ------------------ src/ui/form/opt/pages/optmainpage.cpp | 2 +- src/ui/form/prog/programswindow.cpp | 2 +- src/ui/form/stat/pages/statmainpage.cpp | 2 +- src/ui/form/tray/trayicon.cpp | 2 +- src/ui/fort_icons.qrc | 3 ++- src/ui/icons/large_tiles.png | Bin 0 -> 1024 bytes src/ui/icons/node-tree.png | Bin 1359 -> 0 bytes src/ui/icons/tower.png | Bin 0 -> 2011 bytes 15 files changed, 40 insertions(+), 40 deletions(-) rename src/ui/form/home/pages/{updatespage.cpp => homepage.cpp} (55%) create mode 100644 src/ui/form/home/pages/homepage.h delete mode 100644 src/ui/form/home/pages/updatespage.h create mode 100644 src/ui/icons/large_tiles.png delete mode 100644 src/ui/icons/node-tree.png create mode 100644 src/ui/icons/tower.png diff --git a/src/ui/FortFirewallUI.pro b/src/ui/FortFirewallUI.pro index 4fbfc2a5..9b41875d 100644 --- a/src/ui/FortFirewallUI.pro +++ b/src/ui/FortFirewallUI.pro @@ -64,7 +64,7 @@ SOURCES += \ form/home/pages/aboutpage.cpp \ form/home/pages/homebasepage.cpp \ form/home/pages/homemainpage.cpp \ - form/home/pages/updatespage.cpp \ + form/home/pages/homepage.cpp \ form/opt/optionscontroller.cpp \ form/opt/optionswindow.cpp \ form/opt/pages/addresses/addressescolumn.cpp \ @@ -251,7 +251,7 @@ HEADERS += \ form/home/pages/aboutpage.h \ form/home/pages/homebasepage.h \ form/home/pages/homemainpage.h \ - form/home/pages/updatespage.h \ + form/home/pages/homepage.h \ form/opt/optionscontroller.h \ form/opt/optionswindow.h \ form/opt/pages/addresses/addressescolumn.h \ diff --git a/src/ui/form/home/homewindow.cpp b/src/ui/form/home/homewindow.cpp index b61a1b02..2658f36e 100644 --- a/src/ui/form/home/homewindow.cpp +++ b/src/ui/form/home/homewindow.cpp @@ -137,7 +137,7 @@ QWidget *HomeWindow::setupHeader() auto textLogo = setupLogoText(); // Menu button - m_btMenu = ControlUtil::createButton(":/icons/node-tree.png"); + m_btMenu = ControlUtil::createButton(":/icons/large_tiles.png"); m_btMenu->setMenu(windowManager()->trayIcon()->menu()); layout->addWidget(iconLogo); diff --git a/src/ui/form/home/pages/homemainpage.cpp b/src/ui/form/home/pages/homemainpage.cpp index a3cedefc..88893d20 100644 --- a/src/ui/form/home/pages/homemainpage.cpp +++ b/src/ui/form/home/pages/homemainpage.cpp @@ -13,7 +13,7 @@ #include #include "aboutpage.h" -#include "updatespage.h" +#include "homepage.h" HomeMainPage::HomeMainPage(HomeController *ctrl, QWidget *parent) : HomeBasePage(ctrl, parent) { @@ -22,7 +22,7 @@ HomeMainPage::HomeMainPage(HomeController *ctrl, QWidget *parent) : HomeBasePage void HomeMainPage::onRetranslateUi() { - m_btUpdates->setText(tr("Updates")); + m_btHome->setText(tr("My Fort")); m_btAbout->setText(tr("About")); } @@ -52,7 +52,7 @@ QLayout *HomeMainPage::setupSideBar() setupSideBarButtons(); - layout->addWidget(m_btUpdates); + layout->addWidget(m_btHome); layout->addWidget(m_btAbout); layout->addStretch(); @@ -61,9 +61,8 @@ QLayout *HomeMainPage::setupSideBar() void HomeMainPage::setupSideBarButtons() { - m_btUpdates = ControlUtil::createSideButton( - ":/icons/arrow_refresh_small.png", [&] { setCurrentIndex(0); }); - m_btUpdates->setChecked(true); + m_btHome = ControlUtil::createSideButton(":/icons/tower.png", [&] { setCurrentIndex(0); }); + m_btHome->setChecked(true); m_btAbout = ControlUtil::createSideButton(":/icons/information.png", [&] { setCurrentIndex(1); }); @@ -73,7 +72,7 @@ void HomeMainPage::setupStackedLayout() { m_stackedLayout = new QStackedLayout(); - m_stackedLayout->addWidget(new UpdatesPage(ctrl())); + m_stackedLayout->addWidget(new HomePage(ctrl())); m_stackedLayout->addWidget(new AboutPage(ctrl())); } diff --git a/src/ui/form/home/pages/homemainpage.h b/src/ui/form/home/pages/homemainpage.h index 86d29d25..926ebc80 100644 --- a/src/ui/form/home/pages/homemainpage.h +++ b/src/ui/form/home/pages/homemainpage.h @@ -24,7 +24,7 @@ private: void setCurrentIndex(int tabIndex); private: - QToolButton *m_btUpdates = nullptr; + QToolButton *m_btHome = nullptr; QToolButton *m_btAbout = nullptr; QStackedLayout *m_stackedLayout = nullptr; }; diff --git a/src/ui/form/home/pages/updatespage.cpp b/src/ui/form/home/pages/homepage.cpp similarity index 55% rename from src/ui/form/home/pages/updatespage.cpp rename to src/ui/form/home/pages/homepage.cpp index 36fa9649..1cdf19db 100644 --- a/src/ui/form/home/pages/updatespage.cpp +++ b/src/ui/form/home/pages/homepage.cpp @@ -1,4 +1,4 @@ -#include "updatespage.h" +#include "homepage.h" #include @@ -6,16 +6,16 @@ #include
#include -UpdatesPage::UpdatesPage(HomeController *ctrl, QWidget *parent) : HomeBasePage(ctrl, parent) +HomePage::HomePage(HomeController *ctrl, QWidget *parent) : HomeBasePage(ctrl, parent) { setupUi(); } -void UpdatesPage::onRetranslateUi() +void HomePage::onRetranslateUi() { } -void UpdatesPage::setupUi() +void HomePage::setupUi() { auto layout = new QVBoxLayout(); diff --git a/src/ui/form/home/pages/homepage.h b/src/ui/form/home/pages/homepage.h new file mode 100644 index 00000000..c7992150 --- /dev/null +++ b/src/ui/form/home/pages/homepage.h @@ -0,0 +1,20 @@ +#ifndef HOMEPAGE_H +#define HOMEPAGE_H + +#include "homebasepage.h" + +class HomePage : public HomeBasePage +{ + Q_OBJECT + +public: + explicit HomePage(HomeController *ctrl = nullptr, QWidget *parent = nullptr); + +protected slots: + void onRetranslateUi() override; + +private: + void setupUi(); +}; + +#endif // HOMEPAGE_H diff --git a/src/ui/form/home/pages/updatespage.h b/src/ui/form/home/pages/updatespage.h deleted file mode 100644 index eabc4376..00000000 --- a/src/ui/form/home/pages/updatespage.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef UPDATESPAGE_H -#define UPDATESPAGE_H - -#include "homebasepage.h" - -class UpdatesPage : public HomeBasePage -{ - Q_OBJECT - -public: - explicit UpdatesPage(HomeController *ctrl = nullptr, QWidget *parent = nullptr); - -protected slots: - void onRetranslateUi() override; - -private: - void setupUi(); -}; - -#endif // UPDATESPAGE_H diff --git a/src/ui/form/opt/pages/optmainpage.cpp b/src/ui/form/opt/pages/optmainpage.cpp index 1608e7ed..54e95a5c 100644 --- a/src/ui/form/opt/pages/optmainpage.cpp +++ b/src/ui/form/opt/pages/optmainpage.cpp @@ -83,7 +83,7 @@ void OptMainPage::setupTabBar() m_tabWidget->addTab(schedulePage, IconCache::icon(":/icons/clock.png"), QString()); // Menu button - m_btMenu = ControlUtil::createLinkButton(":/icons/node-tree.png"); + m_btMenu = ControlUtil::createLinkButton(":/icons/large_tiles.png"); m_btMenu->setMenu(windowManager()->trayIcon()->menu()); m_tabWidget->setCornerWidget(m_btMenu); diff --git a/src/ui/form/prog/programswindow.cpp b/src/ui/form/prog/programswindow.cpp index 4a0ba7ed..ff0c049e 100644 --- a/src/ui/form/prog/programswindow.cpp +++ b/src/ui/form/prog/programswindow.cpp @@ -239,7 +239,7 @@ QLayout *ProgramsWindow::setupHeader() &WindowManager::showServicesWindow); // Menu button - m_btMenu = ControlUtil::createLinkButton(":/icons/node-tree.png"); + m_btMenu = ControlUtil::createLinkButton(":/icons/large_tiles.png"); m_btMenu->setMenu(windowManager()->trayIcon()->menu()); layout->addWidget(m_btEdit); diff --git a/src/ui/form/stat/pages/statmainpage.cpp b/src/ui/form/stat/pages/statmainpage.cpp index 28c3e468..a6bebf98 100644 --- a/src/ui/form/stat/pages/statmainpage.cpp +++ b/src/ui/form/stat/pages/statmainpage.cpp @@ -48,7 +48,7 @@ void StatMainPage::setupTabBar() m_tabWidget->addTab(connectionsPage, IconCache::icon(":/icons/connect.png"), QString()); // Menu button - m_btMenu = ControlUtil::createLinkButton(":/icons/node-tree.png"); + m_btMenu = ControlUtil::createLinkButton(":/icons/large_tiles.png"); m_btMenu->setMenu(windowManager()->trayIcon()->menu()); m_tabWidget->setCornerWidget(m_btMenu); diff --git a/src/ui/form/tray/trayicon.cpp b/src/ui/form/tray/trayicon.cpp index 803ebc13..0ebdbc44 100644 --- a/src/ui/form/tray/trayicon.cpp +++ b/src/ui/form/tray/trayicon.cpp @@ -347,7 +347,7 @@ void TrayIcon::setupTrayMenu() { m_menu = ControlUtil::createMenu(windowManager()->mainWindow()); - m_homeAction = addAction(m_menu, ":/icons/fort.png", windowManager(), SLOT(showHomeWindow())); + m_homeAction = addAction(m_menu, ":/icons/tower.png", windowManager(), SLOT(showHomeWindow())); addHotKey(m_homeAction, iniUser()->hotKeyHome()); m_programsAction = addAction( diff --git a/src/ui/fort_icons.qrc b/src/ui/fort_icons.qrc index d3a800c4..2c7d4d5b 100644 --- a/src/ui/fort_icons.qrc +++ b/src/ui/fort_icons.qrc @@ -37,9 +37,9 @@ icons/ip.png icons/ip_class.png icons/key.png + icons/large_tiles.png icons/lightbulb.png icons/lock_open.png - icons/node-tree.png icons/page_copy.png icons/pencil.png icons/play.png @@ -48,6 +48,7 @@ icons/scull.png icons/server_components.png icons/time.png + icons/tower.png icons/traffic_lights.png icons/windows-48.png icons/wrench.png diff --git a/src/ui/icons/large_tiles.png b/src/ui/icons/large_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..05dc583c615f7ae6457900416968df87084841b7 GIT binary patch literal 1024 zcmV+b1poVqP)N2J!azU+HnxI@2q{%i;)$2rof+So z-Mib%&FqdLpnJ@1cJIBJ@BMu5y)a`8{L4$y7h_DWK86kmXd4YckeEYw_?~fG3c9y0 z!xBDbw9m@gr;g#W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as+nauK0(u7Y}f3>}gH%Iop-tWN8LaNDbr0?!>hXoaj=-4cq8lVYs{^!Gnx zfjA#APYwVNikv0olp7m5{NiDXyTP$TM@b(VRv!>*g>jQ@S&omtRltB#NVdcFqJ>2f zNh@Ii1B~7ed}u1c?RR!za`J2{33uGpP2U~GL7-y*`K{Q*HVcz*AqLz6NsN3SLwkEL z{MhE!VSzsSRDxUq!l_PfA=$-cL8$DC^Zgd`IDRpJ#5nO^nuqoPtX)bZ=+?%>%`!mu zjXuy`g*!C`0ys^hQVS4k!>ZBs-!?jA)$p1%aB4KoDL|f2Od87>^mGE z?8nzXT(s{ubX|i-Mo*x&uLsHxOFto#$^9Y@t?*Jz<+kI9Nc$|4bn#J5V*0m#5;|~& zV}pRIlA(i&D&D5~NJpED)d5em*^ERhzBbySfE*be!KxAolk7^J6Ic_RJwZaGuz&yK zmaTiMRob<6ync56#DN2LKPjw&h#q%dZ++yls?}<7|M;`-+1l@jbl_4WK49{FVq&7; z6pWYwSo>ZoB$+dzNNpD^Aii(xdzRUqn{UF0r#`W&2fGs*?7Dk>JeC13d?1bNv-OoJK3X{GVE!1M)KG#77V;$?0;h$ft5YNaXC; z*w`AIC@XN0KkG9J)Ya6wsdW|{SpKhz)AJIwDRx+*wwhXbg`?1*_Se4x3;=twf?M002ovPDHLkV1id`i}U~h diff --git a/src/ui/icons/tower.png b/src/ui/icons/tower.png new file mode 100644 index 0000000000000000000000000000000000000000..055a08f05914211175f3b6a9894472eb4024f6aa GIT binary patch literal 2011 zcmV<12PF83P)wKX(7TQ@ks+ zQR#gDmmfpUFkssb&h?+T#jZ4fp!nx7*7Rf&Mo5EZTKV_IlLyr-?JN^Frju}Ne5ef^ zceeQpgD?dQ%B^;a&_EFdpZr}1u3CZn0M&#~1GcFtJR2Lq_NGSsVOGIc?{P3UHjN+j zJpiL(J93VK?8*%+y}!ucxITn0iFzmigX4x}lS&2Ub{0=3v5iC5Zij%gm_>YdZ7#C2 z`BC^(1CxV)f@0-h8y=6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