diff options
Diffstat (limited to 'apps/theming/lib/Themes/DefaultTheme.php')
-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; } } |