mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2024-10-28 08:49:35 +01: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
|
||||
#define KEYS \
|
||||
X(MinimizeOnClose, true) \
|
||||
X(MinimizeOnClose, false) \
|
||||
X(DownloadPath, defaultDownloadPath) \
|
||||
X(ScreenshotPath, {}) \
|
||||
X(EnableNotifications, true) \
|
||||
|
|
|
@ -83,7 +83,8 @@ SettingsPageBase {
|
|||
id: closeOrMinCheckBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
checked: UtilsAdapter.getAppValue(Settings.MinimizeOnClose)
|
||||
visible: UtilsAdapter.isSystemTrayIconVisible()
|
||||
checked: UtilsAdapter.getAppValue(Settings.MinimizeOnClose) && UtilsAdapter.isSystemTrayIconVisible()
|
||||
labelText: JamiStrings.keepMinimized
|
||||
onSwitchToggled: UtilsAdapter.setAppValue(Settings.Key.MinimizeOnClose, checked)
|
||||
}
|
||||
|
|
|
@ -802,3 +802,11 @@ UtilsAdapter::isRTL()
|
|||
pref == "SYSTEM" ? QLocale::system().name() : pref;
|
||||
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 bool isRTL();
|
||||
Q_INVOKABLE bool isSystemTrayIconVisible();
|
||||
|
||||
Q_SIGNALS:
|
||||
void debugMessageReceived(const QString& message);
|
||||
|
|
Loading…
Reference in a new issue