aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-16 15:26:02 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-05-21 20:36:26 +0200
commit85b64e15ad0029305b34c606c6d3805c47d10964 (patch)
treeb9fe987bb2caddb56cfc8c15ae30b38c155d35c1 /apps/theming/lib
parent8028784976f05ca42f2ebc844c2f637085126009 (diff)
downloadnextcloud-server-85b64e15ad0029305b34c606c6d3805c47d10964.tar.gz
nextcloud-server-85b64e15ad0029305b34c606c6d3805c47d10964.zip
fix: Always populate `--image-background`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming/lib')
-rw-r--r--apps/theming/lib/Themes/CommonThemeTrait.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php
index 05e8054a291..bdf95d98275 100644
--- a/apps/theming/lib/Themes/CommonThemeTrait.php
+++ b/apps/theming/lib/Themes/CommonThemeTrait.php
@@ -97,7 +97,6 @@ trait CommonThemeTrait {
$variables = [
'--color-background-plain' => $backgroundColor,
'--color-background-plain-text' => $this->util->invertTextColor($backgroundColor) ? '#000000' : '#ffffff',
- '--image-background-default' => "url('" . $this->themingDefaults->getBackground() . "')",
'--background-image-invert-if-bright' => $this->util->invertTextColor($backgroundColor) ? 'invert(100%)' : 'no',
];
@@ -105,8 +104,10 @@ trait CommonThemeTrait {
foreach (ImageManager::SUPPORTED_IMAGE_KEYS as $image) {
if ($this->imageManager->hasImage($image)) {
$imageUrl = $this->imageManager->getImageUrl($image);
- // --image-background is overridden by user theming if logged in
$variables["--image-$image"] = "url('" . $imageUrl . "')";
+ } else if ($image === 'background') {
+ // Apply default background if nothing is configured
+ $variables['--image-background'] = "url('" . $this->themingDefaults->getBackground() . "')";
}
}