Merge branch 'master' into nosyntool
This commit is contained in:
commit
1734e6d7f6
|
@ -73,6 +73,8 @@ static const char* barrierIconFiles[] =
|
||||||
":/res/icons/16x16/barrier-transfering.png"
|
":/res/icons/16x16/barrier-transfering.png"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char* barrierLargeIcon = ":/res/icons/256x256/barrier.ico";
|
||||||
|
|
||||||
MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
|
MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
|
||||||
m_Settings(settings),
|
m_Settings(settings),
|
||||||
m_AppConfig(&appConfig),
|
m_AppConfig(&appConfig),
|
||||||
|
@ -105,7 +107,7 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
|
||||||
setAttribute(Qt::WA_X11NetWmWindowTypeDialog, true);
|
setAttribute(Qt::WA_X11NetWmWindowTypeDialog, true);
|
||||||
|
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
setWindowIcon(QIcon(barrierLargeIcon));
|
||||||
createMenuBar();
|
createMenuBar();
|
||||||
loadSettings();
|
loadSettings();
|
||||||
initConnections();
|
initConnections();
|
||||||
|
@ -286,13 +288,8 @@ void MainWindow::saveSettings()
|
||||||
|
|
||||||
void MainWindow::setIcon(qBarrierState state)
|
void MainWindow::setIcon(qBarrierState state)
|
||||||
{
|
{
|
||||||
QIcon icon;
|
|
||||||
icon.addFile(barrierIconFiles[state]);
|
|
||||||
|
|
||||||
setWindowIcon(icon);
|
|
||||||
|
|
||||||
if (m_pTrayIcon)
|
if (m_pTrayIcon)
|
||||||
m_pTrayIcon->setIcon(icon);
|
m_pTrayIcon->setIcon(QIcon(barrierIconFiles[state]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason)
|
void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason)
|
||||||
|
|
Loading…
Reference in New Issue