mirror of
https://github.com/tnodir/fort
synced 2024-11-15 15:16:34 +00:00
UI: Move setupAppStyle() back to main.cpp
This commit is contained in:
parent
2679c82275
commit
33a33029de
@ -6,8 +6,6 @@
|
||||
#include <QMessageBox>
|
||||
#include <QMouseEvent>
|
||||
#include <QProcess>
|
||||
#include <QStyle>
|
||||
#include <QStyleFactory>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QThreadPool>
|
||||
#include <QTimer>
|
||||
@ -112,8 +110,6 @@ void FortManager::initialize()
|
||||
m_connListModel = new ConnListModel(m_statManager, this);
|
||||
}
|
||||
|
||||
setupAppStyle();
|
||||
|
||||
setupTranslationManager();
|
||||
setupThreadPool();
|
||||
|
||||
@ -745,14 +741,6 @@ void FortManager::saveTrayFlags()
|
||||
saveConf(conf(), true);
|
||||
}
|
||||
|
||||
void FortManager::setupAppStyle()
|
||||
{
|
||||
// Style & Palette
|
||||
const auto fusionStyle = QStyleFactory::create("Fusion");
|
||||
QApplication::setStyle(fusionStyle);
|
||||
QApplication::setPalette(fusionStyle->standardPalette());
|
||||
}
|
||||
|
||||
void FortManager::saveProgWindowState()
|
||||
{
|
||||
settings()->setProgWindowGeometry(m_progWindowState->geometry());
|
||||
|
@ -131,8 +131,6 @@ private slots:
|
||||
void saveTrayFlags();
|
||||
|
||||
private:
|
||||
void setupAppStyle();
|
||||
|
||||
void setupTranslationManager();
|
||||
|
||||
void setupThreadPool();
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QStyle>
|
||||
#include <QStyleFactory>
|
||||
|
||||
#ifdef USE_VISUAL_LEAK_DETECTOR
|
||||
# include <vld.h>
|
||||
@ -19,6 +21,13 @@
|
||||
#define FORT_ERROR_INSTANCE 1
|
||||
#define FORT_ERROR_CONTROL 2
|
||||
|
||||
static void setupAppStyle()
|
||||
{
|
||||
const auto fusionStyle = QStyleFactory::create("Fusion");
|
||||
QApplication::setStyle(fusionStyle);
|
||||
QApplication::setPalette(fusionStyle->standardPalette());
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Uninstall: Unregister booted provider, startup entries and exit
|
||||
@ -67,6 +76,8 @@ int main(int argc, char *argv[])
|
||||
if (settings.isService()) {
|
||||
ServiceManager::runService();
|
||||
} else {
|
||||
setupAppStyle(); // Style & Palette
|
||||
|
||||
fortManager.show();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user