From 272d7848cbd82584b297c8e103c1146722ba6e38 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Wed, 30 Dec 2020 03:49:45 +0300 Subject: [PATCH] Fix macOS tray icon logic --- Telegram/SourceFiles/platform/mac/main_window_mac.mm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm index 0974933a6..067f23512 100644 --- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm +++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm @@ -139,17 +139,15 @@ private: ? WithColor({ 0, 0, 0, 180 }) : iconImageLight; static const auto DarkModeResult = iconImageDark.isNull() - ? WithColor({ 255, 255, 255 }) - : iconImageLight.isNull() - ? iconImageDark - : iconImageLight; - static const auto LightModeSelectedResult = iconImageLightSelected.isNull() ? (iconImageLight.isNull() - ? DarkModeResult + ? WithColor({ 255, 255, 255 }) : iconImageLight) + : iconImageDark; + static const auto LightModeSelectedResult = iconImageLightSelected.isNull() + ? DarkModeResult : iconImageLightSelected; static const auto DarkModeSelectedResult = iconImageDarkSelected.isNull() - ? DarkModeResult + ? LightModeSelectedResult : iconImageDarkSelected; auto result = darkMode