mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-18 14:00:09 +00:00
Add 'respect system dark mode' checkbox.
This commit is contained in:
@@ -426,7 +426,7 @@ void MainWindow::initHook() {
|
||||
|| QSystemTrayIcon::isSystemTrayAvailable();
|
||||
|
||||
LOG(("System tray available: %1").arg(Logs::b(trayAvailable)));
|
||||
cSetSupportTray(trayAvailable);
|
||||
Platform::SetTrayIconSupported(trayAvailable);
|
||||
|
||||
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
auto sniWatcher = new QDBusServiceWatcher(
|
||||
@@ -591,9 +591,9 @@ void MainWindow::onSNIOwnerChanged(
|
||||
const auto trayAvailable = SNIAvailable
|
||||
|| QSystemTrayIcon::isSystemTrayAvailable();
|
||||
|
||||
cSetSupportTray(trayAvailable);
|
||||
Platform::SetTrayIconSupported(trayAvailable);
|
||||
|
||||
if (cSupportTray()) {
|
||||
if (trayAvailable) {
|
||||
psSetupTrayIcon();
|
||||
} else {
|
||||
LOG(("System tray is not available."));
|
||||
@@ -654,9 +654,9 @@ void MainWindow::psSetupTrayIcon() {
|
||||
}
|
||||
|
||||
void MainWindow::workmodeUpdated(DBIWorkMode mode) {
|
||||
if (!cSupportTray()) return;
|
||||
|
||||
if (mode == dbiwmWindowOnly) {
|
||||
if (!Platform::TrayIconSupported()) {
|
||||
return;
|
||||
} else if (mode == dbiwmWindowOnly) {
|
||||
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
if (_sniTrayIcon) {
|
||||
_sniTrayIcon->setContextMenu(0);
|
||||
|
Reference in New Issue
Block a user