From c2f382aba86aaebb9806ff1b43c1af69992e9a10 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Mon, 11 Jul 2022 15:01:02 +0300 Subject: support dark mode for images with alpha channel --- engine/Skin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/Skin.php') diff --git a/engine/Skin.php b/engine/Skin.php index 917eef7..a8924d4 100644 --- a/engine/Skin.php +++ b/engine/Skin.php @@ -23,8 +23,8 @@ class Skin { else $js = null; - $theme = ($_COOKIE['theme'] ?? 'auto'); - if (!in_array($theme, ['auto', 'dark', 'light'])) + $theme = themes::getUserTheme(); + if ($theme != 'auto' && !themes::themeExists($theme)) $theme = 'auto'; $layout_ctx = new SkinContext('\\skin\\base'); -- cgit v1.2.3