UI: Fix main tab icons on startup.

This commit is contained in:
Nodir Temirkhodjaev 2017-09-07 10:43:33 +05:00
parent 2177fc3b33
commit 82bbe1bdff
2 changed files with 8 additions and 2 deletions

View File

@ -6,6 +6,7 @@
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QQmlContext> #include <QQmlContext>
#include <QSystemTrayIcon> #include <QSystemTrayIcon>
#include <QTimer>
#include <QWindow> #include <QWindow>
#include "activityLog/logbuffer.h" #include "activityLog/logbuffer.h"
@ -96,6 +97,11 @@ void FortManager::setupEngine()
m_appWindow = qobject_cast<QWindow *>( m_appWindow = qobject_cast<QWindow *>(
m_engine->rootObjects().first()); m_engine->rootObjects().first());
Q_ASSERT(m_appWindow); Q_ASSERT(m_appWindow);
// XXX: Workaround to fix icons' incorrect position on main tab buttons
QTimer::singleShot(100, [this]() {
m_appWindow->resize(1024, 768);
});
} }
void FortManager::showTrayIcon() void FortManager::showTrayIcon()

View File

@ -7,8 +7,8 @@ import com.fortfirewall 1.0
ApplicationWindow { ApplicationWindow {
id: appWindow id: appWindow
width: 800 width: 1025
height: 600 height: 768
minimumWidth: 700 minimumWidth: 700
minimumHeight: 600 minimumHeight: 600