aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/Themes/CommonThemeTrait.php
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-01-19 15:47:05 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2024-05-21 20:36:21 +0200
commit0211feb94647a0e329030b66bc4c5b4304d10a0f (patch)
tree3f139ef19ccf443b42188e7bcf43e63a99b88449 /apps/theming/lib/Themes/CommonThemeTrait.php
parent5ae18ee06ebbc693e9fae93bf9e0078f699068f3 (diff)
downloadnextcloud-server-0211feb94647a0e329030b66bc4c5b4304d10a0f.tar.gz
nextcloud-server-0211feb94647a0e329030b66bc4c5b4304d10a0f.zip
fix(theming): Also set default background color ("primary") for custom images
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/theming/lib/Themes/CommonThemeTrait.php')
-rw-r--r--apps/theming/lib/Themes/CommonThemeTrait.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php
index dd5b25e1a29..cf2427e823e 100644
--- a/apps/theming/lib/Themes/CommonThemeTrait.php
+++ b/apps/theming/lib/Themes/CommonThemeTrait.php
@@ -151,7 +151,8 @@ trait CommonThemeTrait {
$cacheBuster = substr(sha1($user->getUID() . '_' . $currentVersion), 0, 8);
return [
'--image-background' => "url('" . $this->urlGenerator->linkToRouteAbsolute('theming.userTheme.getBackground') . "?v=$cacheBuster')",
- '--color-background-plain' => $this->primaryColor,
+ '--color-background-plain' => $this->themingDefaults->getColorPrimary(),
+ '--background-image-invert-if-bright' => $isPrimaryBright ? 'invert(100%)' : 'no',
];
}