From 8f4c17eeb46e880fd2cd74e4e877a33ee2d6b44f Mon Sep 17 00:00:00 2001 From: Keshav Bhatt Date: Mon, 19 Jul 2021 01:10:17 +0530 Subject: - fixed #9 (Window minimum width is too small); Now the minimum width is set to 800px - fixed #11 (Disable "Application is minimized to system tray" notification); Now the app only report this message once per session. --- src/mainwindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 45a2262..1a9aeab 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -24,7 +24,7 @@ MainWindow::MainWindow(QWidget *parent) setWindowTitle(QApplication::applicationName()); setWindowIcon(QIcon(":/icons/app/icon-256.png")); - setMinimumWidth(500); + setMinimumWidth(800); setMinimumHeight(600); restoreGeometry(settings.value("geometry").toByteArray()); @@ -359,11 +359,15 @@ void MainWindow::closeEvent(QCloseEvent *event) if(QSystemTrayIcon::isSystemTrayAvailable() && settings.value("closeButtonActionCombo",0).toInt() == 0){ this->hide(); event->ignore(); - notify(QApplication::applicationName(),"Application is minimized to system tray."); + if(settings.value("firstrun_tray",true).toBool()){ + notify(QApplication::applicationName(),"Application is minimized to system tray."); + settings.setValue("firstrun_tray", false); + } return; } event->accept(); qApp->quit(); + settings.setValue("firstrun_tray", true); QMainWindow::closeEvent(event); } @@ -460,6 +464,7 @@ void MainWindow::quitApp() getPageTheme(); QTimer::singleShot(500,[=](){ qWarning()<<"THEME"<quit(); }); } -- cgit v1.2.3