diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-09-24 03:02:50 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-09-28 21:01:41 +0300 |
commit | 9c073fd760a84baaa6fcb8f7ffebe5164a439e32 (patch) | |
tree | 96944a6bf0ac32e44807aa613e66ae6c020ae0e1 /apps/theming/lib | |
parent | c12f26867dd5797904fc155f4f44dd7cdde43506 (diff) |
Fix various theming bugs
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r-- | apps/theming/lib/Themes/DefaultTheme.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 13737aa1bd4..203e03757c8 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -227,9 +227,15 @@ class DefaultTheme implements ITheme { $themingBackground = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'background', 'default'); if ($themingBackground === 'custom') { + // Custom $variables['--image-main-background'] = "url('" . $this->urlGenerator->linkToRouteAbsolute('theming.userTheme.getBackground') . "')"; } elseif ($themingBackground !== 'default' && substr($themingBackground, 0, 1) !== '#') { + // Shipped background $variables['--image-main-background'] = "url('" . $this->urlGenerator->linkTo(Application::APP_ID, "/img/background/$themingBackground") . "')"; + } elseif (substr($themingBackground, 0, 1) === '#') { + // Color + unset($variables['--image-main-background']); + $variables['--color-main-background-plain'] = $this->primaryColor; } } |