From 19734a9983b7edac3b6cb41ac5a953c5c2fa62d0 Mon Sep 17 00:00:00 2001 From: Keshav Bhatt Date: Wed, 30 Mar 2022 20:23:14 +0530 Subject: chore: inform app is minimized via notification - if the app started minimized in tray --- src/main.cpp | 2 +- src/mainwindow.cpp | 7 ++++--- src/settingswidget.ui | 7 +++---- src/utils.cpp | 7 +++---- 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 57c2852..3d74935 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); app.setQuitOnLastWindowClosed(false); - app.setWindowIcon(QIcon(":/icons/app/icon-256.png")); + app.setWindowIcon(QIcon(":/icons/app/icon-128.png")); QApplication::setApplicationName("WhatSie"); QApplication::setOrganizationName("org.keshavnrj.ubuntu"); QApplication::setApplicationVersion(VERSIONSTR); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4433068..cff03ac 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -128,7 +128,10 @@ void MainWindow::initRateWidget() { }); } -void MainWindow::runMinimized() { this->minimizeAction->trigger(); } +void MainWindow::runMinimized() { + this->minimizeAction->trigger(); + notify("Whatsie", "Whatsie started minimized in tray"); +} MainWindow::~MainWindow() { webEngine->deleteLater(); } @@ -196,9 +199,7 @@ void MainWindow::updateWindowTheme() { } QList widgets = this->findChildren(); - foreach (QWidget *w, widgets) { w->setPalette(qApp->palette()); } - setNotificationPresenter(webEngine->page()->profile()); if (lockWidget != nullptr) { diff --git a/src/settingswidget.ui b/src/settingswidget.ui index 94cdcd7..76a7649 100644 --- a/src/settingswidget.ui +++ b/src/settingswidget.ui @@ -99,7 +99,7 @@ background:transparent; 0 0 675 - 808 + 791 @@ -364,15 +364,14 @@ background:transparent; - Minimize app in tray on start + Minimize App in tray on start - Minimize/Maximize on right clicking tray Icon -(if supported by system tray) + Show/Hide on clicking tray Icon (if supported) diff --git a/src/utils.cpp b/src/utils.cpp index eeab445..0c70ef9 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -204,10 +204,8 @@ QString utils::appDebugInfo() { QString(GIT_BRANCH) + "" << "
  • " + QObject::tr("Commit Hash") + ": " + QString(GIT_HASH) + "
  • " - << "
  • " + QObject::tr("Build Date") + ": " + - QString::fromLatin1(__DATE__) + "
  • " - << "
  • " + QObject::tr("Build Time") + ": " + - QString::fromLatin1(__TIME__) + "
  • " + << "
  • " + QObject::tr("Build Datetime") + ": " + + QString::fromLatin1(BUILD_TIMESTAMP) + "
  • " << "
  • " + QObject::tr("Qt Runtime Version") + ": " + QString(qVersion()) + "
  • " << "
  • " + QObject::tr("Qt Compiled Version") + ": " + @@ -241,6 +239,7 @@ void utils::DisplayExceptionErrorDialog(const QString &error_info) { << "\nApp version: " + QString(VERSIONSTR) << "\nSource Branch: " + QString(GIT_BRANCH) << "\nCommit Hash: " + QString(GIT_HASH) + << "\nBuild Datetime: " + QString(BUILD_TIMESTAMP) << "\nQt Runtime Version: " + QString(qVersion()) << "\nQt Compiled Version: " + QString(QT_VERSION_STR) << "\nSystem: " + QSysInfo::prettyProductName() -- cgit v1.2.3