aboutsummaryrefslogtreecommitdiff
path: root/engine/Skin.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-07-11 15:01:02 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-07-11 15:01:02 +0300
commitc2f382aba86aaebb9806ff1b43c1af69992e9a10 (patch)
treeaee205721fd675926c5e7163eec0dddc448f7813 /engine/Skin.php
parent24982a48f570b89e537850dda4a4d1ac33ea919f (diff)
support dark mode for images with alpha channel
Diffstat (limited to 'engine/Skin.php')
-rw-r--r--engine/Skin.php4
1 files changed, 2 insertions, 2 deletions
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');