mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Add TDESKTOP_FORCE_PANEL_ICON environment variable for possibility to use system icon even if it is not detected
This commit is contained in:
@@ -37,6 +37,7 @@ namespace Platform {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr auto kDisableTrayCounter = "TDESKTOP_DISABLE_TRAY_COUNTER"_cs;
|
constexpr auto kDisableTrayCounter = "TDESKTOP_DISABLE_TRAY_COUNTER"_cs;
|
||||||
|
constexpr auto kForcePanelIcon = "TDESKTOP_FORCE_PANEL_ICON"_cs;
|
||||||
constexpr auto kPanelTrayIconName = "telegram-panel"_cs;
|
constexpr auto kPanelTrayIconName = "telegram-panel"_cs;
|
||||||
constexpr auto kMutePanelTrayIconName = "telegram-mute-panel"_cs;
|
constexpr auto kMutePanelTrayIconName = "telegram-mute-panel"_cs;
|
||||||
constexpr auto kAttentionPanelTrayIconName = "telegram-attention-panel"_cs;
|
constexpr auto kAttentionPanelTrayIconName = "telegram-attention-panel"_cs;
|
||||||
@@ -356,7 +357,8 @@ void MainWindow::setSNITrayIcon(int counter, bool muted, bool firstShow) {
|
|||||||
const auto iconName = GetTrayIconName(counter, muted);
|
const auto iconName = GetTrayIconName(counter, muted);
|
||||||
|
|
||||||
if (qEnvironmentVariableIsSet(kDisableTrayCounter.utf8())
|
if (qEnvironmentVariableIsSet(kDisableTrayCounter.utf8())
|
||||||
&& !iconName.isEmpty()) {
|
&& (!iconName.isEmpty()
|
||||||
|
|| qEnvironmentVariableIsSet(kForcePanelIcon.utf8()))) {
|
||||||
if (_sniTrayIcon->iconName() == iconName) {
|
if (_sniTrayIcon->iconName() == iconName) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user