aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorLibravatar Keshav Bhatt <keshavnrj@gmail.com>2021-07-19 01:10:17 +0530
committerLibravatar Keshav Bhatt <keshavnrj@gmail.com>2021-07-19 01:10:17 +0530
commit8f4c17eeb46e880fd2cd74e4e877a33ee2d6b44f (patch)
tree886c4c9f28088572c82fdd21c31133d2727b0997 /src/mainwindow.cpp
parentd6cce74a83e16b9c1f39fa684d7b8fa8a52a3632 (diff)
downloadwhatsie-8f4c17eeb46e880fd2cd74e4e877a33ee2d6b44f.tar.gz
whatsie-8f4c17eeb46e880fd2cd74e4e877a33ee2d6b44f.zip
- 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.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp9
1 files changed, 7 insertions, 2 deletions
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"<<settings.value("windowTheme").toString();
+ settings.setValue("firstrun_tray", true);
qApp->quit();
});
}