mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-07 08:15:50 +02:00
systemtray: remove option to minimize in systray if tray not visible
Change-Id: I56ad4a55bda8a26931d81d6dbe903c41c65ba345 GitLab: #391
This commit is contained in:
parent
f7bc95d47e
commit
316750ad93
4 changed files with 12 additions and 2 deletions
|
@ -34,7 +34,7 @@ extern const QString defaultDownloadPath;
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
#define KEYS \
|
#define KEYS \
|
||||||
X(MinimizeOnClose, true) \
|
X(MinimizeOnClose, false) \
|
||||||
X(DownloadPath, defaultDownloadPath) \
|
X(DownloadPath, defaultDownloadPath) \
|
||||||
X(ScreenshotPath, {}) \
|
X(ScreenshotPath, {}) \
|
||||||
X(EnableNotifications, true) \
|
X(EnableNotifications, true) \
|
||||||
|
|
|
@ -83,7 +83,8 @@ SettingsPageBase {
|
||||||
id: closeOrMinCheckBox
|
id: closeOrMinCheckBox
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
checked: UtilsAdapter.getAppValue(Settings.MinimizeOnClose)
|
visible: UtilsAdapter.isSystemTrayIconVisible()
|
||||||
|
checked: UtilsAdapter.getAppValue(Settings.MinimizeOnClose) && UtilsAdapter.isSystemTrayIconVisible()
|
||||||
labelText: JamiStrings.keepMinimized
|
labelText: JamiStrings.keepMinimized
|
||||||
onSwitchToggled: UtilsAdapter.setAppValue(Settings.Key.MinimizeOnClose, checked)
|
onSwitchToggled: UtilsAdapter.setAppValue(Settings.Key.MinimizeOnClose, checked)
|
||||||
}
|
}
|
||||||
|
|
|
@ -802,3 +802,11 @@ UtilsAdapter::isRTL()
|
||||||
pref == "SYSTEM" ? QLocale::system().name() : pref;
|
pref == "SYSTEM" ? QLocale::system().name() : pref;
|
||||||
return pref == "ar" || pref == "he" || pref == "fa" || pref == "ur";
|
return pref == "ar" || pref == "he" || pref == "fa" || pref == "ur";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
UtilsAdapter::isSystemTrayIconVisible()
|
||||||
|
{
|
||||||
|
if (!systemTray_)
|
||||||
|
return false;
|
||||||
|
return systemTray_->geometry() != QRect();
|
||||||
|
}
|
||||||
|
|
|
@ -150,6 +150,7 @@ public:
|
||||||
Q_INVOKABLE QVariantMap getVideoPlayer(const QString& resource, const QString& bgColor);
|
Q_INVOKABLE QVariantMap getVideoPlayer(const QString& resource, const QString& bgColor);
|
||||||
|
|
||||||
Q_INVOKABLE bool isRTL();
|
Q_INVOKABLE bool isRTL();
|
||||||
|
Q_INVOKABLE bool isSystemTrayIconVisible();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void debugMessageReceived(const QString& message);
|
void debugMessageReceived(const QString& message);
|
||||||
|
|
Loading…
Add table
Reference in a new issue