mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:46:03 +00:00
UI: Update icons
This commit is contained in:
parent
a029a38b17
commit
06c1f1ed3d
@ -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 \
|
||||
|
@ -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);
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <util/iconcache.h>
|
||||
|
||||
#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()));
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "updatespage.h"
|
||||
#include "homepage.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
@ -6,16 +6,16 @@
|
||||
#include <form/home/homecontroller.h>
|
||||
#include <util/iconcache.h>
|
||||
|
||||
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();
|
||||
|
20
src/ui/form/home/pages/homepage.h
Normal file
20
src/ui/form/home/pages/homepage.h
Normal file
@ -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
|
@ -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
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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(
|
||||
|
@ -37,9 +37,9 @@
|
||||
<file>icons/ip.png</file>
|
||||
<file>icons/ip_class.png</file>
|
||||
<file>icons/key.png</file>
|
||||
<file>icons/large_tiles.png</file>
|
||||
<file>icons/lightbulb.png</file>
|
||||
<file>icons/lock_open.png</file>
|
||||
<file>icons/node-tree.png</file>
|
||||
<file>icons/page_copy.png</file>
|
||||
<file>icons/pencil.png</file>
|
||||
<file>icons/play.png</file>
|
||||
@ -48,6 +48,7 @@
|
||||
<file>icons/scull.png</file>
|
||||
<file>icons/server_components.png</file>
|
||||
<file>icons/time.png</file>
|
||||
<file>icons/tower.png</file>
|
||||
<file>icons/traffic_lights.png</file>
|
||||
<file>icons/windows-48.png</file>
|
||||
<file>icons/wrench.png</file>
|
||||
|
BIN
src/ui/icons/large_tiles.png
Normal file
BIN
src/ui/icons/large_tiles.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
BIN
src/ui/icons/tower.png
Normal file
BIN
src/ui/icons/tower.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue
Block a user